Skip to content

Commit

Permalink
hwmon: (ibmpex.c) fix NULL dereference
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Adrian Bunk authored and Mark M. Hoffman committed Nov 8, 2007
1 parent 76e6386 commit 9be4844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hwmon/ibmpex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 9be4844

Please sign in to comment.