Skip to content

Commit

Permalink
[media] ir: properly handle an error at input_register
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 58b3dd4 commit 991369e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/IR/ir-keytable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 991369e

Please sign in to comment.