diff mbox

IR/imon: remove incorrect calls to input_free_device

Message ID 20100726141352.GA28182@redhat.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jarod Wilson July 26, 2010, 2:13 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c
index 0195dd5..08dff8c 100644
--- a/drivers/media/IR/imon.c
+++ b/drivers/media/IR/imon.c
@@ -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);