Skip to content

Commit

Permalink
V4L/DVB: media: ir-keytable: null dereference in debug code
Browse files Browse the repository at this point in the history
"ir_dev->props" can be NULL.  We only use raw mode if "ir_dev->props" is
non-NULL and "ir_dev->props->driver_type == RC_DRIVER_IR_RAW".

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent f7b80e6 commit ede67a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/media/IR/ir-keytable.c
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ int __ir_input_register(struct input_dev *input_dev,

IR_dprintk(1, "Registered input device on %s for %s remote%s.\n",
driver_name, rc_tab->name,
ir_dev->props->driver_type == RC_DRIVER_IR_RAW ? " in raw mode" : "");
(ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ?
" in raw mode" : "");

return 0;

Expand Down

0 comments on commit ede67a3

Please sign in to comment.