]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
hwmon: (emc1403) Remove unnecessary hwmon_device_unregister
authorYong Wang <yong.y.wang@linux.intel.com>
Fri, 17 Sep 2010 15:24:12 +0000 (17:24 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:45 +0000 (13:36 -0700)
commit f17c811d1433aa1966f9c5a744841427e9a97ecf upstream.

It is unnecessary and wrong to call hwmon_device_unregister in error
handling before hwmon_device_register is called.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Reviewed-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/emc1403.c

index 0e4b5642638dd5bba6ca52720aa69e8fb8153f73..3f5a00e516155d72cbdf36c6b806b9aacc7a5058 100644 (file)
@@ -275,7 +275,6 @@ static int emc1403_probe(struct i2c_client *client,
        res = sysfs_create_group(&client->dev.kobj, &m_thermal_gr);
        if (res) {
                dev_warn(&client->dev, "create group failed\n");
-               hwmon_device_unregister(data->hwmon_dev);
                goto thermal_error1;
        }
        data->hwmon_dev = hwmon_device_register(&client->dev);