Commit 45050387 authored by Dan Carpenter's avatar Dan Carpenter Committed by james toy

The current code probably returns -EINVAL a lot. Otherwise it would oops.

Compile tested only.  Found by smatch (http://repo.or.cz/w/smatch.git).
Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent a79ac3a9
......@@ -364,7 +364,7 @@ add_layer2(struct mISDNchannel *ch, struct mISDNstack *st)
static int
st_own_ctrl(struct mISDNchannel *ch, u_int cmd, void *arg)
{
if (!ch->st || ch->st->layer1)
if (!ch->st || !ch->st->layer1)
return -EINVAL;
return ch->st->layer1->ctrl(ch->st->layer1, cmd, arg);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment