V4L/DVB: IR/imon: remove incorrect calls to input_free_device
authorJarod Wilson <jarod@redhat.com>
Mon, 26 Jul 2010 14:11:36 +0000 (11:11 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Aug 2010 02:42:57 +0000 (23:42 -0300)
Per Dmitry Torokhov, following input_unregister_device with an
input_free_device is forbidden, the former is sufficient alone.

Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/IR/imon.c

index 65c125e44e964ebd71ec15d955bd0a67035e7bb9..a665d48bed4736ea4e8a05c18f90c3bf9fb4dbd7 100644 (file)
@@ -1944,7 +1944,6 @@ static struct imon_context *imon_init_intf0(struct usb_interface *intf)
 
 urb_submit_failed:
        ir_input_unregister(ictx->idev);
-       input_free_device(ictx->idev);
 idev_setup_failed:
 find_endpoint_failed:
        mutex_unlock(&ictx->lock);
@@ -2014,10 +2013,8 @@ static struct imon_context *imon_init_intf1(struct usb_interface *intf,
        return ictx;
 
 urb_submit_failed:
-       if (ictx->touch) {
+       if (ictx->touch)
                input_unregister_device(ictx->touch);
-               input_free_device(ictx->touch);
-       }
 touch_setup_failed:
 find_endpoint_failed:
        mutex_unlock(&ictx->lock);