From: Dave Jones Date: Mon, 10 Jul 2006 11:45:18 +0000 (-0700) Subject: [PATCH] s390: broken null test in claw driver X-Git-Tag: v2.6.18-rc2~146 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68e3c5e3b5c29ea76152dc1d1482826434d45019;p=linux-2.6 [PATCH] s390: broken null test in claw driver Whoops, better hope this never gets passed a null dev in its current state. Signed-off-by: Dave Jones Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Michael Holzheu Cc: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 23d53bf9da..95f4e105cb 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c @@ -529,7 +529,7 @@ claw_open(struct net_device *dev) printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); #endif CLAW_DBF_TEXT(4,trace,"open"); - if (!dev | (dev->name[0] == 0x00)) { + if (!dev || (dev->name[0] == 0x00)) { CLAW_DBF_TEXT(2,trace,"BadDev"); printk(KERN_WARNING "claw: Bad device at open failing \n"); return -ENODEV;