summaryrefslogtreecommitdiff
path: root/drivers/staging/line6/driver.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-11-30 11:43:41 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-01 09:57:32 -0800
commit4bd8b4de6f806f1429d23a2f6e2549ed0e8bc49b (patch)
tree3daab3d79bdb7c004af12eeb914fd372441b84f3 /drivers/staging/line6/driver.c
parentf75c0510784e9f6ce8808b01fb826d89d0ffbcd6 (diff)
Staging: line6: NULL dereference in dev_err()
"line6" hasn't been set at this point and we should be using &interface->dev instead. Gcc would have complained about this if it weren't for the fact that we initialized line6 to NULL. I removed the initialization. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/line6/driver.c')
-rw-r--r--drivers/staging/line6/driver.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index a71a5af7f8e3..a2f48ee463ee 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -726,8 +726,8 @@ static int line6_probe(struct usb_interface *interface,
const struct usb_device_id *id)
{
int devtype;
- struct usb_device *usbdev = NULL;
- struct usb_line6 *line6 = NULL;
+ struct usb_device *usbdev;
+ struct usb_line6 *line6;
const struct line6_properties *properties;
int devnum;
int interface_number, alternate = 0;
@@ -936,7 +936,7 @@ static int line6_probe(struct usb_interface *interface,
}
if (size == 0) {
- dev_err(line6->ifcdev,
+ dev_err(&interface->dev,
"driver bug: interface data size not set\n");
ret = -ENODEV;
goto err_put;