aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/onetouch.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-09-27 18:13:53 -0400
committerJeff Garzik <jeff@garzik.org>2006-09-27 18:13:53 -0400
commitaebb1153ac54ddbbd3d3f0481a193f4bf0ead53b (patch)
tree57425aa83c8bed5b41af7e3408024fe1f2fdded9 /drivers/usb/storage/onetouch.c
parent022e7a12b6aa11a11de4d708fe8606c9a6734b37 (diff)
parenta77c64c1a641950626181b4857abb701d8f38ccc (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/usb/storage/onetouch.c')
-rw-r--r--drivers/usb/storage/onetouch.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c
index 313920d980c9..f843a0bcf107 100644
--- a/drivers/usb/storage/onetouch.c
+++ b/drivers/usb/storage/onetouch.c
@@ -135,6 +135,7 @@ int onetouch_connect_input(struct us_data *ss)
135 struct usb_onetouch *onetouch; 135 struct usb_onetouch *onetouch;
136 struct input_dev *input_dev; 136 struct input_dev *input_dev;
137 int pipe, maxp; 137 int pipe, maxp;
138 int error = -ENOMEM;
138 139
139 interface = ss->pusb_intf->cur_altsetting; 140 interface = ss->pusb_intf->cur_altsetting;
140 141
@@ -211,15 +212,18 @@ int onetouch_connect_input(struct us_data *ss)
211 ss->suspend_resume_hook = usb_onetouch_pm_hook; 212 ss->suspend_resume_hook = usb_onetouch_pm_hook;
212#endif 213#endif
213 214
214 input_register_device(onetouch->dev); 215 error = input_register_device(onetouch->dev);
216 if (error)
217 goto fail3;
215 218
216 return 0; 219 return 0;
217 220
221 fail3: usb_free_urb(onetouch->irq);
218 fail2: usb_buffer_free(udev, ONETOUCH_PKT_LEN, 222 fail2: usb_buffer_free(udev, ONETOUCH_PKT_LEN,
219 onetouch->data, onetouch->data_dma); 223 onetouch->data, onetouch->data_dma);
220 fail1: kfree(onetouch); 224 fail1: kfree(onetouch);
221 input_free_device(input_dev); 225 input_free_device(input_dev);
222 return -ENOMEM; 226 return error;
223} 227}
224 228
225void onetouch_release_input(void *onetouch_) 229void onetouch_release_input(void *onetouch_)