One line above we have checked that udc is NULL so we shouldn't
dereference it while printing error message.

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Krzysztof Opasiak <[email protected]>
---
 drivers/usb/usbip/vudc_sysfs.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/usbip/vudc_sysfs.c b/drivers/usb/usbip/vudc_sysfs.c
index 25ca16a..3c691cd 100644
--- a/drivers/usb/usbip/vudc_sysfs.c
+++ b/drivers/usb/usbip/vudc_sysfs.c
@@ -198,7 +198,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);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to