mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
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>
This commit is contained in:
parent
2a7a10b86c
commit
442ee366be
1 changed files with 1 additions and 1 deletions
|
@ -201,7 +201,7 @@ static ssize_t usbip_status_show(struct device *dev,
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (!udc) {
|
if (!udc) {
|
||||||
dev_err(&udc->pdev->dev, "no device");
|
dev_err(dev, "no device");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
spin_lock_irq(&udc->ud.lock);
|
spin_lock_irq(&udc->ud.lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue