Commit 68e3c5e3 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[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: default avatarDave 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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f1c0a578
...@@ -529,7 +529,7 @@ claw_open(struct net_device *dev) ...@@ -529,7 +529,7 @@ claw_open(struct net_device *dev)
printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__);
#endif #endif
CLAW_DBF_TEXT(4,trace,"open"); CLAW_DBF_TEXT(4,trace,"open");
if (!dev | (dev->name[0] == 0x00)) { if (!dev || (dev->name[0] == 0x00)) {
CLAW_DBF_TEXT(2,trace,"BadDev"); CLAW_DBF_TEXT(2,trace,"BadDev");
printk(KERN_WARNING "claw: Bad device at open failing \n"); printk(KERN_WARNING "claw: Bad device at open failing \n");
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment