diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-08-24 19:41:56 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-08-24 20:44:29 -0400 |
commit | d4879c9e0fee98dca512acd7c9b045c1b73091d6 (patch) | |
tree | b476627d483de0e60eb53b4f4b25da752adf3da0 | |
parent | 67b3bfd0c22274f1b3c40f0820cbdc1d71f7d0cd (diff) |
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>
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 8 |
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 | |||
1361 | usb_set_intfdata(intf, wacom); | 1361 | usb_set_intfdata(intf, wacom); |
1362 | 1362 | ||
1363 | if (features->quirks & WACOM_QUIRK_MONITOR) { | 1363 | if (features->quirks & WACOM_QUIRK_MONITOR) { |
1364 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) | 1364 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { |
1365 | error = -EIO; | ||
1365 | goto fail5; | 1366 | goto fail5; |
1367 | } | ||
1366 | } | 1368 | } |
1367 | 1369 | ||
1368 | return 0; | 1370 | return 0; |
@@ -1417,8 +1419,8 @@ static int wacom_resume(struct usb_interface *intf) | |||
1417 | wacom_query_tablet_data(intf, features); | 1419 | wacom_query_tablet_data(intf, features); |
1418 | wacom_led_control(wacom); | 1420 | wacom_led_control(wacom); |
1419 | 1421 | ||
1420 | if ((wacom->open || features->quirks & WACOM_QUIRK_MONITOR) | 1422 | if ((wacom->open || (features->quirks & WACOM_QUIRK_MONITOR)) && |
1421 | && usb_submit_urb(wacom->irq, GFP_NOIO) < 0) | 1423 | usb_submit_urb(wacom->irq, GFP_NOIO) < 0) |
1422 | rv = -EIO; | 1424 | rv = -EIO; |
1423 | 1425 | ||
1424 | mutex_unlock(&wacom->lock); | 1426 | mutex_unlock(&wacom->lock); |