Commit f908037a authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

hwmon: (lm85) Better label names

Label names ERROR1 and ERROR3 aren't exactly explicit. Change them for
better names that indicate what we are up to.
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarHerbert Poetzl <herbert@13thfloor.at>
parent 1b92adad
...@@ -1244,7 +1244,7 @@ static int lm85_probe(struct i2c_client *client, ...@@ -1244,7 +1244,7 @@ static int lm85_probe(struct i2c_client *client,
/* Register sysfs hooks */ /* Register sysfs hooks */
err = sysfs_create_group(&client->dev.kobj, &lm85_group); err = sysfs_create_group(&client->dev.kobj, &lm85_group);
if (err) if (err)
goto ERROR1; goto err_kfree;
/* The ADT7463 has an optional VRM 10 mode where pin 21 is used /* The ADT7463 has an optional VRM 10 mode where pin 21 is used
as a sixth digital VID input rather than an analog input. */ as a sixth digital VID input rather than an analog input. */
...@@ -1252,29 +1252,29 @@ static int lm85_probe(struct i2c_client *client, ...@@ -1252,29 +1252,29 @@ static int lm85_probe(struct i2c_client *client,
if (!(data->type == adt7463 && (data->vid & 0x80))) if (!(data->type == adt7463 && (data->vid & 0x80)))
if ((err = sysfs_create_group(&client->dev.kobj, if ((err = sysfs_create_group(&client->dev.kobj,
&lm85_group_in4))) &lm85_group_in4)))
goto ERROR3; goto err_remove_files;
/* The EMC6D100 has 3 additional voltage inputs */ /* The EMC6D100 has 3 additional voltage inputs */
if (data->type == emc6d100) if (data->type == emc6d100)
if ((err = sysfs_create_group(&client->dev.kobj, if ((err = sysfs_create_group(&client->dev.kobj,
&lm85_group_in567))) &lm85_group_in567)))
goto ERROR3; goto err_remove_files;
data->hwmon_dev = hwmon_device_register(&client->dev); data->hwmon_dev = hwmon_device_register(&client->dev);
if (IS_ERR(data->hwmon_dev)) { if (IS_ERR(data->hwmon_dev)) {
err = PTR_ERR(data->hwmon_dev); err = PTR_ERR(data->hwmon_dev);
goto ERROR3; goto err_remove_files;
} }
return 0; return 0;
/* Error out and cleanup code */ /* Error out and cleanup code */
ERROR3: err_remove_files:
sysfs_remove_group(&client->dev.kobj, &lm85_group); sysfs_remove_group(&client->dev.kobj, &lm85_group);
sysfs_remove_group(&client->dev.kobj, &lm85_group_in4); sysfs_remove_group(&client->dev.kobj, &lm85_group_in4);
if (data->type == emc6d100) if (data->type == emc6d100)
sysfs_remove_group(&client->dev.kobj, &lm85_group_in567); sysfs_remove_group(&client->dev.kobj, &lm85_group_in567);
ERROR1: err_kfree:
kfree(data); kfree(data);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment