summaryrefslogtreecommitdiffstats
path: root/drivers/media/IR
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-08-06 03:31:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-08 23:43:06 -0300
commitede67a30f549e1872be57e7d6f5f9dd97bb372ae (patch)
treeced00f0ceaebae992b64ac4cc57212edb9b55b4c /drivers/media/IR
parentf7b80e6919df812b4bed99a927325312a904111b (diff)
V4L/DVB: media: ir-keytable: null dereference in debug code
"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>
Diffstat (limited to 'drivers/media/IR')
-rw-r--r--drivers/media/IR/ir-keytable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 7032ea047f8..7e82a9df726 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -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;