Commit 442ee366 authored by Krzysztof Opasiak's avatar Krzysztof Opasiak Committed by Greg Kroah-Hartman

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarKrzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2a7a10b8
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment