Commit d4879c9e authored by Wei Yongjun's avatar Wei Yongjun Committed by 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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 67b3bfd0
...@@ -1361,8 +1361,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -1361,8 +1361,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
usb_set_intfdata(intf, wacom); usb_set_intfdata(intf, wacom);
if (features->quirks & WACOM_QUIRK_MONITOR) { 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; goto fail5;
}
} }
return 0; return 0;
...@@ -1417,8 +1419,8 @@ static int wacom_resume(struct usb_interface *intf) ...@@ -1417,8 +1419,8 @@ static int wacom_resume(struct usb_interface *intf)
wacom_query_tablet_data(intf, features); wacom_query_tablet_data(intf, features);
wacom_led_control(wacom); wacom_led_control(wacom);
if ((wacom->open || features->quirks & WACOM_QUIRK_MONITOR) if ((wacom->open || (features->quirks & WACOM_QUIRK_MONITOR)) &&
&& usb_submit_urb(wacom->irq, GFP_NOIO) < 0) usb_submit_urb(wacom->irq, GFP_NOIO) < 0)
rv = -EIO; rv = -EIO;
mutex_unlock(&wacom->lock); mutex_unlock(&wacom->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