diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-10-17 15:29:02 -0400 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-11-08 08:42:46 -0500 |
commit | 9be484446cf15b8d935ef493c59a9b059c0cbb71 (patch) | |
tree | 61ff1bf261b59e0c68a2995fbf0cf3f3327ac6bb /drivers/hwmon/ibmpex.c | |
parent | 76e63860daedb302bddd707a765411c902d936bd (diff) |
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>
Diffstat (limited to 'drivers/hwmon/ibmpex.c')
-rw-r--r-- | drivers/hwmon/ibmpex.c | 2 |
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) | |||
457 | data = kzalloc(sizeof(*data), GFP_KERNEL); | 457 | data = kzalloc(sizeof(*data), GFP_KERNEL); |
458 | if (!data) { | 458 | if (!data) { |
459 | printk(KERN_ERR DRVNAME ": Insufficient memory for BMC " | 459 | printk(KERN_ERR DRVNAME ": Insufficient memory for BMC " |
460 | "interface %d.\n", data->interface); | 460 | "interface.\n"); |
461 | return; | 461 | return; |
462 | } | 462 | } |
463 | 463 | ||