[PATCH] ibmpex: Release IPMI user if hwmon registration fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roel Kluin <12o3l at tiscali.nl> found a minor defect in the init code if
hwmon device registration fails.

Signed-off-by: Darrick J. Wong <djwong at us.ibm.com>
---

 drivers/hwmon/ibmpex.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/ibmpex.c b/drivers/hwmon/ibmpex.c
index fe2c261..c462824 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 */




[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux