kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] media: ir-keytable: null dereference in debug code
@ 2010-08-06  6:31 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-08-06  6:31 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: David Härdeman, linux-media, kernel-janitors

"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>

diff --git a/drivers/media/IR/ir-keytable.c b/drivers/media/IR/ir-keytable.c
index 15a0f19..cf97427 100644
--- a/drivers/media/IR/ir-keytable.c
+++ b/drivers/media/IR/ir-keytable.c
@@ -499,7 +499,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;
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-06  6:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-06  6:31 [patch] media: ir-keytable: null dereference in debug code Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).