All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] video/saa7134: potential null dereferences in debug code
@ 2010-05-22 20:15 ` Dan Carpenter
  0 siblings, 0 replies; 12+ messages in thread
From: Dan Carpenter @ 2010-05-22 20:15 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Jean Delvare, Beholder Intl. Ltd. Dmitry Belimov, hermann pitton,
	Douglas Schilling Landgraf, linux-media, kernel-janitors

I modified the dprintk and i2cdprintk macros to handle null dev and ir
pointers.  There are two couple places that call dprintk() when "dev" is
null.  One is in get_key_msi_tvanywhere_plus() and the other is in
get_key_flydvb_trio(). 

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index e5565e2..e14f2f8 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -61,9 +61,9 @@ MODULE_PARM_DESC(disable_other_ir, "disable full codes of "
     "alternative remotes from other manufacturers");
 
 #define dprintk(fmt, arg...)	if (ir_debug) \
-	printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg)
+	printk(KERN_DEBUG "%s/ir: " fmt, dev ? dev->name : "<null>", ## arg)
 #define i2cdprintk(fmt, arg...)    if (ir_debug) \
-	printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg)
+	printk(KERN_DEBUG "%s/ir: " fmt, ir ? ir->name : "<null>", ## arg)
 
 /* Helper functions for RC5 and NEC decoding at GPIO16 or GPIO18 */
 static int saa7134_rc5_irq(struct saa7134_dev *dev);

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-05-29  7:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 20:15 [patch] video/saa7134: potential null dereferences in debug code Dan Carpenter
2010-05-22 20:15 ` Dan Carpenter
2010-05-22 20:59 ` [patch] video/saa7134: potential null dereferences in debug Jean Delvare
2010-05-22 20:59   ` [patch] video/saa7134: potential null dereferences in debug code Jean Delvare
2010-05-24 15:59   ` [patch v2] video/saa7134: change dprintk() to i2cdprintk() Dan Carpenter
2010-05-24 15:59     ` Dan Carpenter
2010-05-24 18:04     ` Jean Delvare
2010-05-24 18:04       ` Jean Delvare
2010-05-29  4:29   ` [patch] video/saa7134: potential null dereferences in debug Mauro Carvalho Chehab
2010-05-29  4:29     ` [patch] video/saa7134: potential null dereferences in debug code Mauro Carvalho Chehab
2010-05-29  7:06     ` [patch] video/saa7134: potential null dereferences in debug Jean Delvare
2010-05-29  7:06       ` [patch] video/saa7134: potential null dereferences in debug code Jean Delvare

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.