diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:33:39 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2007-04-12 01:33:39 -0400 |
commit | 5014186de89708d0e9eed60526b698d5b786b707 (patch) | |
tree | 949ea6219db7779f635a34278325bd2d9617c657 /drivers/usb/input/ati_remote2.c | |
parent | db61a9124880a1d79b7b320d4b6bef717f23e485 (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_remote2.c')
-rw-r--r-- | drivers/usb/input/ati_remote2.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/input/ati_remote2.c b/drivers/usb/input/ati_remote2.c index 6459be90599c..5656278d7965 100644 --- a/drivers/usb/input/ati_remote2.c +++ b/drivers/usb/input/ati_remote2.c | |||
@@ -337,7 +337,7 @@ static void ati_remote2_complete_key(struct urb *urb) | |||
337 | static int ati_remote2_input_init(struct ati_remote2 *ar2) | 337 | static int ati_remote2_input_init(struct ati_remote2 *ar2) |
338 | { | 338 | { |
339 | struct input_dev *idev; | 339 | struct input_dev *idev; |
340 | int i; | 340 | int i, retval; |
341 | 341 | ||
342 | idev = input_allocate_device(); | 342 | idev = input_allocate_device(); |
343 | if (!idev) | 343 | if (!idev) |
@@ -364,11 +364,11 @@ static int ati_remote2_input_init(struct ati_remote2 *ar2) | |||
364 | usb_to_input_id(ar2->udev, &idev->id); | 364 | usb_to_input_id(ar2->udev, &idev->id); |
365 | idev->cdev.dev = &ar2->udev->dev; | 365 | idev->cdev.dev = &ar2->udev->dev; |
366 | 366 | ||
367 | i = input_register_device(idev); | 367 | retval = input_register_device(idev); |
368 | if (i) | 368 | if (retval) |
369 | input_free_device(idev); | 369 | input_free_device(idev); |
370 | 370 | ||
371 | return i; | 371 | return retval; |
372 | } | 372 | } |
373 | 373 | ||
374 | static int ati_remote2_urb_init(struct ati_remote2 *ar2) | 374 | static int ati_remote2_urb_init(struct ati_remote2 *ar2) |