提交 d4879c9e 编写于 作者: W Wei Yongjun 提交者: Dmitry Torokhov

Input: wacom - fix error return code in wacom_probe()

Fix to return a negative error code from the urb submit error
handling case instead of 0, as done elsewhere in this function.
Signed-off-by: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 67b3bfd0
......@@ -1361,8 +1361,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
usb_set_intfdata(intf, wacom);
if (features->quirks & WACOM_QUIRK_MONITOR) {
if (usb_submit_urb(wacom->irq, GFP_KERNEL))
if (usb_submit_urb(wacom->irq, GFP_KERNEL)) {
error = -EIO;
goto fail5;
}
}
return 0;
......@@ -1417,8 +1419,8 @@ static int wacom_resume(struct usb_interface *intf)
wacom_query_tablet_data(intf, features);
wacom_led_control(wacom);
if ((wacom->open || features->quirks & WACOM_QUIRK_MONITOR)
&& usb_submit_urb(wacom->irq, GFP_NOIO) < 0)
if ((wacom->open || (features->quirks & WACOM_QUIRK_MONITOR)) &&
usb_submit_urb(wacom->irq, GFP_NOIO) < 0)
rv = -EIO;
mutex_unlock(&wacom->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册