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>
This commit is contained in:
Dan Carpenter 2011-11-30 11:43:41 +03:00 committed by Greg Kroah-Hartman
parent f75c051078
commit 4bd8b4de6f
1 changed files with 3 additions and 3 deletions

View File

@ -726,8 +726,8 @@ static int line6_probe(struct usb_interface *interface,
const struct usb_device_id *id) const struct usb_device_id *id)
{ {
int devtype; int devtype;
struct usb_device *usbdev = NULL; struct usb_device *usbdev;
struct usb_line6 *line6 = NULL; struct usb_line6 *line6;
const struct line6_properties *properties; const struct line6_properties *properties;
int devnum; int devnum;
int interface_number, alternate = 0; int interface_number, alternate = 0;
@ -936,7 +936,7 @@ static int line6_probe(struct usb_interface *interface,
} }
if (size == 0) { if (size == 0) {
dev_err(line6->ifcdev, dev_err(&interface->dev,
"driver bug: interface data size not set\n"); "driver bug: interface data size not set\n");
ret = -ENODEV; ret = -ENODEV;
goto err_put; goto err_put;