From: Mauro Carvalho Chehab Date: Thu, 14 Oct 2010 20:49:33 +0000 (-0300) Subject: [media] ir: properly handle an error at input_register X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=991369e33f0182903d2c64e4b1c6c74ed6f83089;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [media] ir: properly handle an error at input_register Be sure to rollback all init if input register fails. Cc: Maxim Levitsky Acked-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index a616bd052336..5f24cd6ed990 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,