summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-08-24 16:41:56 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2013-08-24 17:44:29 -0700
commitd4879c9e0fee98dca512acd7c9b045c1b73091d6 (patch)
treeb476627d483de0e60eb53b4f4b25da752adf3da0 /drivers
parent67b3bfd0c22274f1b3c40f0820cbdc1d71f7d0cd (diff)
downloadlinux-d4879c9e0fee98dca512acd7c9b045c1b73091d6.tar.bz2
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/tablet/wacom_sys.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 1ad3e07986b4..79b69ea47f74 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -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);