]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
hwmon: (ibmpex) Release IPMI user if hwmon registration fails
authorDarrick J. Wong <djwong@us.ibm.com>
Tue, 9 Oct 2007 22:08:24 +0000 (15:08 -0700)
committerMark M. Hoffman <mhoffman@lightlink.com>
Thu, 11 Oct 2007 11:42:00 +0000 (07:42 -0400)
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>
drivers/hwmon/ibmpex.c

index fe2c2616c6b1e45057ce29adaa35748c71a4b0a7..c462824ffccfe9936d0f6236dc8788a3d5d2dacf 100644 (file)
@@ -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 */