提交 442ee366 编写于 作者: K Krzysztof Opasiak 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NKrzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册