[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100420135538.GA1994@bluebox.local>
Date: Tue, 20 Apr 2010 15:55:40 +0200
From: "Hans J. Koch" <hjk@...utronix.de>
To: netdev@...r.kernel.org
Cc: socketcan-core@...ts.berlios.de,
Sebastian Haas <haas@...-wuensche.com>
Subject: [PATCH] can: Fix possible NULL pointer dereference in ems_usb.c
In ems_usb_probe(), a pointer is dereferenced after making sure it is NULL...
This patch replaces dev_err() with printk() to avoid this.
Signed-off-by: "Hans J. Koch" <hjk@...utronix.de>
---
drivers/net/can/usb/ems_usb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.34-rc/drivers/net/can/usb/ems_usb.c
===================================================================
--- linux-2.6.34-rc.orig/drivers/net/can/usb/ems_usb.c 2010-04-20 15:32:25.000000000 +0200
+++ linux-2.6.34-rc/drivers/net/can/usb/ems_usb.c 2010-04-20 15:33:20.000000000 +0200
@@ -1006,7 +1006,7 @@
netdev = alloc_candev(sizeof(struct ems_usb), MAX_TX_URBS);
if (!netdev) {
- dev_err(netdev->dev.parent, "Couldn't alloc candev\n");
+ printk(KERN_ERR "ems_usb: Couldn't alloc candev\n");
return -ENOMEM;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists