Commit 4cfdbe7f authored by Darrick J. Wong's avatar Darrick J. Wong Committed by Mark M. Hoffman
Browse files

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: default avatarDarrick J. Wong <djwong@us.ibm.com>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent e95c237d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -498,8 +498,7 @@ static void ibmpex_register_bmc(int iface, struct device *dev)
		printk(KERN_ERR DRVNAME ": Error, unable to register hwmon "
		printk(KERN_ERR DRVNAME ": Error, unable to register hwmon "
		       "class device for interface %d\n",
		       "class device for interface %d\n",
		       data->interface);
		       data->interface);
		kfree(data);
		goto out_user;
		return;
	}
	}


	/* finally add the new bmc data to the bmc data list */
	/* finally add the new bmc data to the bmc data list */