mISDN: fix reversed if in st_own_ctrl()
Subsystems (2)
PATCH 4/6 mISDN: fix reversed if in st_own_ctrl()
From: Dan Carpenter <[email protected]>
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 <[email protected]>
Cc Karsten Keil <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/isdn/mISDN/stack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/isdn/mISDN/stack.c renamed from drivers/isdn/mISDN/stack.c~misdn-fix-reversed-if-in-st_own_ctrl +1 -1
@@ -364,7 +364,7 @@ add_layer2(struct mISDNchannel *ch, strustatic 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); }
_