summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorKrzysztof Opasiak <k.opasiak@samsung.com>2016-04-29 12:34:13 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-29 15:31:30 -0700
commit442ee366bec3cbdaf5794e80f803d87c5787c5d8 (patch)
treed189879fc7c6f98eb57a8c068bb4ab5425860757 /drivers/usb
parent2a7a10b86c125fd3410bb975e8515ac5dddc3238 (diff)
usb: usbip: Avoid NULL pointer dereference in case of error
One line above we have checked that udc is NULL so we shouldn't dereference it while printing error message. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/usbip/vudc_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/usbip/vudc_sysfs.c b/drivers/usb/usbip/vudc_sysfs.c
index 40d5c8f72825..99397fa1e3f0 100644
--- a/drivers/usb/usbip/vudc_sysfs.c
+++ b/drivers/usb/usbip/vudc_sysfs.c
@@ -201,7 +201,7 @@ static ssize_t usbip_status_show(struct device *dev,
int status;
if (!udc) {
- dev_err(&udc->pdev->dev, "no device");
+ dev_err(dev, "no device");
return -ENODEV;
}
spin_lock_irq(&udc->ud.lock);