summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-10-17 21:29:02 +0200
committerMark M. Hoffman <mhoffman@lightlink.com>2007-11-08 14:42:46 +0100
commit9be484446cf15b8d935ef493c59a9b059c0cbb71 (patch)
tree61ff1bf261b59e0c68a2995fbf0cf3f3327ac6bb
parenthwmon: (sis5595) Split sis5595_attributes_opt (diff)
downloadlinux-9be484446cf15b8d935ef493c59a9b059c0cbb71.tar.xz
linux-9be484446cf15b8d935ef493c59a9b059c0cbb71.zip
hwmon: (ibmpex.c) fix NULL dereference
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> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
-rw-r--r--drivers/hwmon/ibmpex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index c462824ffccf..e14ce3d79d12 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;
}