Browse Source

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 <djwong@us.ibm.com>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Darrick J. Wong 17 years ago
parent
commit
4cfdbe7f6c
1 changed files with 1 additions and 2 deletions
  1. 1 2
      drivers/hwmon/ibmpex.c

+ 1 - 2
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 */