Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9be48444 authored by Adrian Bunk's avatar Adrian Bunk Committed by Mark M. Hoffman
Browse files

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: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent 76e63860
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}