[PATCH] V4L/DVB: ir: properly handle an error at input_register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Be sure to rollback all init if input register fails.

Cc: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
Cc: Jarod Wilson <jarod@xxxxxxxxxx>
Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>

diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index a616bd0..5f24cd6 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -507,6 +507,8 @@ int __ir_input_register(struct input_dev *input_dev,
 		}
 
 	rc = ir_register_input(input_dev);
+	if (rc < 0)
+		goto out_event;
 
 	IR_dprintk(1, "Registered input device on %s for %s remote%s.\n",
 		   driver_name, rc_tab->name,
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux