From 9be484446cf15b8d935ef493c59a9b059c0cbb71 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 17 Oct 2007 21:29:02 +0200 Subject: 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 Signed-off-by: Mark M. Hoffman --- drivers/hwmon/ibmpex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-58-ga151