From d4879c9e0fee98dca512acd7c9b045c1b73091d6 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sat, 24 Aug 2013 16:41:56 -0700 Subject: [PATCH] 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 Signed-off-by: Dmitry Torokhov --- drivers/input/tablet/wacom_sys.c | 8 +++++--- 1 file 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); -- 2.30.2