All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [2.6 patch] hwmon/ibmpex.c: fix NULL dereference
@ 2007-10-17 19:29 ` Adrian Bunk
  0 siblings, 0 replies; 22+ messages in thread
From: Adrian Bunk @ 2007-10-17 19:29 UTC (permalink / raw)
  To: Darrick J. Wong, Mark M. Hoffman; +Cc: lm-sensors, linux-kernel

Don't dereference "data" when we know for sure it's NULL.

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@kernel.org>

---
66bec2ef5c6d55fc30ef6ac5bb97fdfcfaf394f2 
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index c462824..e14ce3d 100644
--- a/drivers/hwmon/ibmpex.c
+++ b/drivers/hwmon/ibmpex.c
@@ -457,7 +457,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
 	data = kzalloc(sizeof(*data), GFP_KERNEL);
 	if (!data) {
 		printk(KERN_ERR DRVNAME ": Insufficient memory for BMC "
-		       "interface %d.\n", data->interface);
+		       "interface.\n");
 		return;
 	}
 


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2007-10-23 11:27 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17 19:29 [lm-sensors] [2.6 patch] hwmon/ibmpex.c: fix NULL dereference Adrian Bunk
2007-10-17 19:29 ` Adrian Bunk
2007-10-17 19:39 ` [lm-sensors] " Nish Aravamudan
2007-10-17 19:39   ` Nish Aravamudan
2007-10-17 19:50   ` [lm-sensors] " Adrian Bunk
2007-10-17 19:50     ` Adrian Bunk
2007-10-17 20:58 ` [lm-sensors] " Jean Delvare
2007-10-17 20:58   ` Jean Delvare
2007-10-17 22:15   ` [lm-sensors] [PATCH] ibmpex: Change printk to dev_{info, err} macros Darrick J. Wong
2007-10-17 22:15     ` [PATCH] ibmpex: Change printk to dev_{info,err} macros Darrick J. Wong
2007-10-19  8:54     ` [lm-sensors] [PATCH] ibmpex: Change printk to dev_{info, Jean Delvare
2007-10-19  8:54       ` [PATCH] ibmpex: Change printk to dev_{info,err} macros Jean Delvare
2007-10-19 23:35       ` [lm-sensors] [PATCH v2] ibmpex: Change printk to dev_{info, Darrick J. Wong
2007-10-19 23:35         ` [PATCH v2] ibmpex: Change printk to dev_{info,err} macros Darrick J. Wong
2007-10-20 21:30         ` [lm-sensors] [PATCH v2] ibmpex: Change printk to dev_{info, Jean Delvare
2007-10-20 21:30           ` [PATCH v2] ibmpex: Change printk to dev_{info,err} macros Jean Delvare
2007-10-23 11:23           ` [lm-sensors] [PATCH v2] ibmpex: Change printk to dev_{info, Mark M. Hoffman
2007-10-23 11:23             ` [PATCH v2] ibmpex: Change printk to dev_{info,err} macros Mark M. Hoffman
2007-10-17 21:10 ` [lm-sensors] [2.6 patch] hwmon/ibmpex.c: fix NULL dereference Darrick J. Wong
2007-10-17 21:10   ` Darrick J. Wong
2007-10-18 13:34 ` [lm-sensors] " Mark M. Hoffman
2007-10-18 13:34   ` Mark M. Hoffman

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.