aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/rc/rc-main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index a158b321b40a..d84533699668 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1781,12 +1781,6 @@ int rc_register_device(struct rc_dev *dev)
1781 dev->input_name ?: "Unspecified device", path ?: "N/A"); 1781 dev->input_name ?: "Unspecified device", path ?: "N/A");
1782 kfree(path); 1782 kfree(path);
1783 1783
1784 if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
1785 rc = rc_setup_rx_device(dev);
1786 if (rc)
1787 goto out_dev;
1788 }
1789
1790 if (dev->driver_type == RC_DRIVER_IR_RAW || 1784 if (dev->driver_type == RC_DRIVER_IR_RAW ||
1791 dev->driver_type == RC_DRIVER_IR_RAW_TX) { 1785 dev->driver_type == RC_DRIVER_IR_RAW_TX) {
1792 if (!raw_init) { 1786 if (!raw_init) {
@@ -1795,7 +1789,13 @@ int rc_register_device(struct rc_dev *dev)
1795 } 1789 }
1796 rc = ir_raw_event_register(dev); 1790 rc = ir_raw_event_register(dev);
1797 if (rc < 0) 1791 if (rc < 0)
1798 goto out_rx; 1792 goto out_dev;
1793 }
1794
1795 if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
1796 rc = rc_setup_rx_device(dev);
1797 if (rc)
1798 goto out_raw;
1799 } 1799 }
1800 1800
1801 /* Allow the RC sysfs nodes to be accessible */ 1801 /* Allow the RC sysfs nodes to be accessible */
@@ -1807,8 +1807,8 @@ int rc_register_device(struct rc_dev *dev)
1807 1807
1808 return 0; 1808 return 0;
1809 1809
1810out_rx: 1810out_raw:
1811 rc_free_rx_device(dev); 1811 ir_raw_event_unregister(dev);
1812out_dev: 1812out_dev:
1813 device_del(&dev->dev); 1813 device_del(&dev->dev);
1814out_unlock: 1814out_unlock: