aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/ati_remote.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:33:39 -0400
committerDmitry Torokhov <dtor@insightbb.com>2007-04-12 01:33:39 -0400
commit5014186de89708d0e9eed60526b698d5b786b707 (patch)
tree949ea6219db7779f635a34278325bd2d9617c657 /drivers/usb/input/ati_remote.c
parentdb61a9124880a1d79b7b320d4b6bef717f23e485 (diff)
Input: USB devices - handle errors when registering input devices
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input/ati_remote.c')
-rw-r--r--drivers/usb/input/ati_remote.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c
index b724e36f7b92..a1ae9eea5741 100644
--- a/drivers/usb/input/ati_remote.c
+++ b/drivers/usb/input/ati_remote.c
@@ -772,15 +772,17 @@ static int ati_remote_probe(struct usb_interface *interface, const struct usb_de
772 goto fail3; 772 goto fail3;
773 773
774 /* Set up and register input device */ 774 /* Set up and register input device */
775 input_register_device(ati_remote->idev); 775 err = input_register_device(ati_remote->idev);
776 if (err)
777 goto fail3;
776 778
777 usb_set_intfdata(interface, ati_remote); 779 usb_set_intfdata(interface, ati_remote);
778 return 0; 780 return 0;
779 781
780fail3: usb_kill_urb(ati_remote->irq_urb); 782 fail3: usb_kill_urb(ati_remote->irq_urb);
781 usb_kill_urb(ati_remote->out_urb); 783 usb_kill_urb(ati_remote->out_urb);
782fail2: ati_remote_free_buffers(ati_remote); 784 fail2: ati_remote_free_buffers(ati_remote);
783fail1: input_free_device(input_dev); 785 fail1: input_free_device(input_dev);
784 kfree(ati_remote); 786 kfree(ati_remote);
785 return err; 787 return err;
786} 788}