diff options
-rw-r--r-- | drivers/input/touchscreen/usbtouchscreen.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c index 07656efee654..7a2d39abc586 100644 --- a/drivers/input/touchscreen/usbtouchscreen.c +++ b/drivers/input/touchscreen/usbtouchscreen.c | |||
@@ -1412,7 +1412,7 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
1412 | err = type->init(usbtouch); | 1412 | err = type->init(usbtouch); |
1413 | if (err) { | 1413 | if (err) { |
1414 | dbg("%s - type->init() failed, err: %d", __func__, err); | 1414 | dbg("%s - type->init() failed, err: %d", __func__, err); |
1415 | goto out_free_buffers; | 1415 | goto out_free_urb; |
1416 | } | 1416 | } |
1417 | } | 1417 | } |
1418 | 1418 | ||
@@ -1424,14 +1424,25 @@ static int usbtouch_probe(struct usb_interface *intf, | |||
1424 | 1424 | ||
1425 | usb_set_intfdata(intf, usbtouch); | 1425 | usb_set_intfdata(intf, usbtouch); |
1426 | 1426 | ||
1427 | if (usbtouch->type->irq_always) | 1427 | if (usbtouch->type->irq_always) { |
1428 | usb_submit_urb(usbtouch->irq, GFP_KERNEL); | 1428 | err = usb_submit_urb(usbtouch->irq, GFP_KERNEL); |
1429 | if (err) { | ||
1430 | err("%s - usb_submit_urb failed with result: %d", | ||
1431 | __func__, err); | ||
1432 | goto out_unregister_input; | ||
1433 | } | ||
1434 | } | ||
1429 | 1435 | ||
1430 | return 0; | 1436 | return 0; |
1431 | 1437 | ||
1438 | out_unregister_input: | ||
1439 | input_unregister_device(input_dev); | ||
1440 | input_dev = NULL; | ||
1432 | out_do_exit: | 1441 | out_do_exit: |
1433 | if (type->exit) | 1442 | if (type->exit) |
1434 | type->exit(usbtouch); | 1443 | type->exit(usbtouch); |
1444 | out_free_urb: | ||
1445 | usb_free_urb(usbtouch->irq); | ||
1435 | out_free_buffers: | 1446 | out_free_buffers: |
1436 | usbtouch_free_buffers(udev, usbtouch); | 1447 | usbtouch_free_buffers(udev, usbtouch); |
1437 | out_free: | 1448 | out_free: |