[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0907171336470.12306@bicker>
Date: Fri, 7 Aug 2009 14:11:20 +0200 (SAST)
From: Dan Carpenter <error27@...il.com>
To: isdn@...ux-pingi.de
cc: linux-kernel@...r.kernel.org
Subject: [patch] 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).
regards,
dan carpenter
Signed-off-by: Dan Carpenter <error27@...il.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);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists