Skip to contentSkip to conversation

mISDN: fix reversed if in st_own_ctrl()

PATCH New Dan Carpenter 1 participant 1 message Aug 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

drivers/isdn/mISDN/stack.c +1 -1
@@ -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);
 }