Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);