summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-10-14 17:49:33 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 07:54:14 -0200
commit991369e33f0182903d2c64e4b1c6c74ed6f83089 (patch)
treea35edc393378a8a83ea365a16c7170b8a853d91e
parent58b3dd449feaa997129bde23592c6a31da039e4e (diff)
downloadlinux-991369e33f0182903d2c64e4b1c6c74ed6f83089.tar.gz
linux-991369e33f0182903d2c64e4b1c6c74ed6f83089.tar.bz2
linux-991369e33f0182903d2c64e4b1c6c74ed6f83089.zip
[media] ir: properly handle an error at input_register
Be sure to rollback all init if input register fails. Cc: Maxim Levitsky <maximlevitsky@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/IR/ir-keytable.c2
1 files changed, 2 insertions, 0 deletions
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,