diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-08-08 14:48:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-09-26 10:53:33 -0400 |
commit | 56b8df11345452103a75060a44429751ce71ee97 (patch) | |
tree | 7ab323b3043c735365aad60557309cd094c19f7e /drivers/media/video/usbvideo/konicawc.c | |
parent | 5aff308c5e73307fc495b89b6421b491f56d3657 (diff) |
V4L/DVB (4413): Konicawc - handle errors from input_register_device()
Compile-tested only (no hardware)
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/usbvideo/konicawc.c')
-rw-r--r-- | drivers/media/video/usbvideo/konicawc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/media/video/usbvideo/konicawc.c b/drivers/media/video/usbvideo/konicawc.c index 6f31ecc88843..4eee8be88314 100644 --- a/drivers/media/video/usbvideo/konicawc.c +++ b/drivers/media/video/usbvideo/konicawc.c | |||
@@ -222,6 +222,7 @@ static void konicawc_adjust_picture(struct uvd *uvd) | |||
222 | static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev) | 222 | static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev) |
223 | { | 223 | { |
224 | struct input_dev *input_dev; | 224 | struct input_dev *input_dev; |
225 | int error; | ||
225 | 226 | ||
226 | usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname)); | 227 | usb_make_path(dev, cam->input_physname, sizeof(cam->input_physname)); |
227 | strncat(cam->input_physname, "/input0", sizeof(cam->input_physname)); | 228 | strncat(cam->input_physname, "/input0", sizeof(cam->input_physname)); |
@@ -242,7 +243,13 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev | |||
242 | 243 | ||
243 | input_dev->private = cam; | 244 | input_dev->private = cam; |
244 | 245 | ||
245 | input_register_device(cam->input); | 246 | error = input_register_device(cam->input); |
247 | if (error) { | ||
248 | warn("Failed to register camera's input device, err: %d\n", | ||
249 | error); | ||
250 | input_free_device(cam->input); | ||
251 | cam->input = NULL; | ||
252 | } | ||
246 | } | 253 | } |
247 | 254 | ||
248 | static void konicawc_unregister_input(struct konicawc *cam) | 255 | static void konicawc_unregister_input(struct konicawc *cam) |