From: Darrick J. Wong Date: Tue, 9 Oct 2007 22:08:24 +0000 (-0700) Subject: hwmon: (ibmpex) Release IPMI user if hwmon registration fails X-Git-Tag: v2.6.24-rc1~1299^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cfdbe7f6cfdc07c27ae8ac490cd3453440dd9d8;p=linux-2.6 hwmon: (ibmpex) Release IPMI user if hwmon registration fails Roel Kluin <12o3l@tiscali.nl> found a minor defect in the init code if hwmon device registration fails. Signed-off-by: Darrick J. Wong Signed-off-by: Mark M. Hoffman --- diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c index fe2c2616c6..c462824ffc 100644 --- a/drivers/hwmon/ibmpex.c +++ b/drivers/hwmon/ibmpex.c @@ -498,8 +498,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev) printk(KERN_ERR DRVNAME ": Error, unable to register hwmon " "class device for interface %d\n", data->interface); - kfree(data); - return; + goto out_user; } /* finally add the new bmc data to the bmc data list */