Skip to content

Commit

Permalink
hwmon: (emc1403) Remove unnecessary hwmon_device_unregister
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yong Wang authored and Jean Delvare committed Sep 17, 2010
1 parent c3b327d commit f17c811
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/hwmon/emc1403.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f17c811

Please sign in to comment.