diff options
author | Dan Carpenter <error27@gmail.com> | 2010-08-06 08:31:00 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-09 04:43:06 +0200 |
commit | ede67a30f549e1872be57e7d6f5f9dd97bb372ae (patch) | |
tree | ced00f0ceaebae992b64ac4cc57212edb9b55b4c /drivers/media/IR | |
parent | V4L/DVB: ivtv: convert to the new control framework (diff) | |
download | linux-ede67a30f549e1872be57e7d6f5f9dd97bb372ae.tar.xz linux-ede67a30f549e1872be57e7d6f5f9dd97bb372ae.zip |
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.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, 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; |