From: Yong Wang Date: Fri, 17 Sep 2010 15:24:12 +0000 (+0200) Subject: hwmon: (emc1403) Remove unnecessary hwmon_device_unregister X-Git-Tag: v2.6.35.5~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd32c724fe62ccb8675f703481694a5ac5ebfa0d;p=thirdparty%2Fkernel%2Fstable.git hwmon: (emc1403) Remove unnecessary hwmon_device_unregister 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 Reviewed-by: Guenter Roeck Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index 0e4b5642638dd..3f5a00e516155 100644 --- a/drivers/hwmon/emc1403.c +++ b/drivers/hwmon/emc1403.c @@ -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);