From: Yong Wang Date: Fri, 17 Sep 2010 15:24:12 +0000 (+0200) Subject: hwmon: (emc1403) Remove unnecessary hwmon_device_unregister X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f17c811d1433aa1966f9c5a744841427e9a97ecf;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Guenter Roeck Cc: stable@kernel.org Signed-off-by: Jean Delvare --- diff --git a/drivers/hwmon/emc1403.c b/drivers/hwmon/emc1403.c index 5b58b20dead1..8dee3f38fdfb 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);