aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorYong Wang <yong.y.wang@linux.intel.com>2010-09-17 17:24:12 +0200
committerJean Delvare <khali@linux-fr.org>2010-09-17 17:24:12 +0200
commitf17c811d1433aa1966f9c5a744841427e9a97ecf (patch)
tree6ac5537523aa1cc76cec7adf1e8bc0d8d1544f60 /drivers
parentc3b327d60bbba3f5ff8fd87d1efc0e95eb6c121b (diff)
downloadmrst-s0i3-test-f17c811d1433aa1966f9c5a744841427e9a97ecf.tar.gz
mrst-s0i3-test-f17c811d1433aa1966f9c5a744841427e9a97ecf.tar.xz
mrst-s0i3-test-f17c811d1433aa1966f9c5a744841427e9a97ecf.zip
hwmon: (emc1403) Remove unnecessary hwmon_device_unregister
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> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/emc1403.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c
index 5b58b20dead..8dee3f38fdf 100644
--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -308,7 +308,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);