* [PATCH] V4L/DVB: ir: properly handle an error at input_register
@ 2010-10-14 20:54 Mauro Carvalho Chehab
2010-10-14 20:59 ` Jarod Wilson
0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2010-10-14 20:54 UTC (permalink / raw)
To: Linux Media Mailing List; +Cc: Maxim Levitsky, Jarod Wilson
Be sure to rollback all init if input register fails.
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
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,
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-14 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-14 20:54 [PATCH] V4L/DVB: ir: properly handle an error at input_register Mauro Carvalho Chehab
2010-10-14 20:59 ` Jarod Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox