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 <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Cc: [email protected]
Signed-off-by: Jean Delvare <[email protected]>
This commit is contained in:
Yong Wang 2010-09-17 17:24:12 +02:00 • committed by Jean Delvare
commit f17c811d14

View file

@ -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);