]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] s390: broken null test in claw driver
authorDave Jones <davej@redhat.com>
Mon, 10 Jul 2006 11:45:18 +0000 (04:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 10 Jul 2006 20:24:25 +0000 (13:24 -0700)
Whoops, better hope this never gets passed a null dev in its current state.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Michael Holzheu <holzheu@de.ibm.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/s390/net/claw.c

index 23d53bf9daf1f236aa489bab73570a2d3398cdb6..95f4e105cb969293934538df62228665a7e40d7a 100644 (file)
@@ -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;