diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-02 03:13:38 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-05-02 03:20:30 -0400 |
commit | a882c932a628cbab17752fc8b1c94692f95bbf9a (patch) | |
tree | 7429e1dc0f1c1cd036f7e75e1a412cb4380de672 /drivers/input | |
parent | 0c9e300adec668fd323b0e79c85b9136fccab649 (diff) |
Input: wacom - return proper error if usb_get_extra_descriptor() fails
Instead of returning 1 (which is not even negative) let's capture and return
error codde returned by usb_get_extra_descriptor().
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 364f2c3432ff..8f3b30b781fa 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -517,11 +517,12 @@ static int wacom_retrieve_hid_descriptor(struct usb_interface *intf, | |||
517 | goto out; | 517 | goto out; |
518 | } | 518 | } |
519 | 519 | ||
520 | if (usb_get_extra_descriptor(interface, HID_DEVICET_HID, &hid_desc)) { | 520 | error = usb_get_extra_descriptor(interface, HID_DEVICET_HID, &hid_desc); |
521 | if (usb_get_extra_descriptor(&interface->endpoint[0], | 521 | if (error) { |
522 | HID_DEVICET_REPORT, &hid_desc)) { | 522 | error = usb_get_extra_descriptor(&interface->endpoint[0], |
523 | printk("wacom: can not retrieve extra class descriptor\n"); | 523 | HID_DEVICET_REPORT, &hid_desc); |
524 | error = 1; | 524 | if (error) { |
525 | printk(KERN_ERR "wacom: can not retrieve extra class descriptor\n"); | ||
525 | goto out; | 526 | goto out; |
526 | } | 527 | } |
527 | } | 528 | } |