From ede67a30f549e1872be57e7d6f5f9dd97bb372ae Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 6 Aug 2010 03:31:00 -0300 Subject: [PATCH] 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/IR/ir-keytable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1