提交 f17c811d 编写于 作者: Y Yong Wang 提交者: Jean Delvare

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: NYong Wang <yong.y.wang@intel.com>
Reviewed-by: NGuenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@kernel.org
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 c3b327d6
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册