diff options
author | Dan Carpenter <error27@gmail.com> | 2010-08-06 02:31:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:06 -0400 |
commit | ede67a30f549e1872be57e7d6f5f9dd97bb372ae (patch) | |
tree | ced00f0ceaebae992b64ac4cc57212edb9b55b4c /drivers/media | |
parent | f7b80e6919df812b4bed99a927325312a904111b (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')
-rw-r--r-- | drivers/media/IR/ir-keytable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c index 7032ea047f8a..7e82a9df726b 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, | |||
507 | 507 | ||
508 | IR_dprintk(1, "Registered input device on %s for %s remote%s.\n", | 508 | IR_dprintk(1, "Registered input device on %s for %s remote%s.\n", |
509 | driver_name, rc_tab->name, | 509 | driver_name, rc_tab->name, |
510 | ir_dev->props->driver_type == RC_DRIVER_IR_RAW ? " in raw mode" : ""); | 510 | (ir_dev->props && ir_dev->props->driver_type == RC_DRIVER_IR_RAW) ? |
511 | " in raw mode" : ""); | ||
511 | 512 | ||
512 | return 0; | 513 | return 0; |
513 | 514 | ||