mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] mISDN: fix reversed if in st_own_ctrl()
@ 2009-08-07 12:11 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2009-08-07 12:11 UTC (permalink / raw)
  To: isdn; +Cc: linux-kernel

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).

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@gmail.com>

--- orig/drivers/isdn/mISDN/stack.c	2009-07-17 13:34:57.000000000 +0300
+++ new/drivers/isdn/mISDN/stack.c	2009-07-17 13:35:32.000000000 +0300
@@ -364,7 +364,7 @@
 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);
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-07 12:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-07 12:11 [patch] mISDN: fix reversed if in st_own_ctrl() Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®