diff options
author | Dan Carpenter <error27@gmail.com> | 2009-11-04 11:27:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-04 11:27:09 -0500 |
commit | 08cb3f60b2f866c906a5a779444b30ba8f9a93c8 (patch) | |
tree | f4fbe2b67c16f411637416b2548389ff20559a3e /drivers/isdn | |
parent | 02303d2028aef19889415364fc5f7bb374887157 (diff) |
misdn: Fix reversed 'if' in st_own_ctrl
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: Dan Carpenter <error27@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/mISDN/stack.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/mISDN/stack.c b/drivers/isdn/mISDN/stack.c index 3e1532a180ff..0d05ec43012c 100644 --- a/drivers/isdn/mISDN/stack.c +++ b/drivers/isdn/mISDN/stack.c | |||
@@ -364,7 +364,7 @@ add_layer2(struct mISDNchannel *ch, struct mISDNstack *st) | |||
364 | static int | 364 | static int |
365 | st_own_ctrl(struct mISDNchannel *ch, u_int cmd, void *arg) | 365 | st_own_ctrl(struct mISDNchannel *ch, u_int cmd, void *arg) |
366 | { | 366 | { |
367 | if (!ch->st || ch->st->layer1) | 367 | if (!ch->st || !ch->st->layer1) |
368 | return -EINVAL; | 368 | return -EINVAL; |
369 | return ch->st->layer1->ctrl(ch->st->layer1, cmd, arg); | 369 | return ch->st->layer1->ctrl(ch->st->layer1, cmd, arg); |
370 | } | 370 | } |