summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-04-29 16:33:36 +0200
committerJean Delvare <khali@endymion.delvare>2011-04-29 16:33:36 +0200
commitbc4d45f1901042a295b10949f51d24cce223e65d (patch)
tree61de31e24034cce008e7fd2544ccfdaa95678acd /drivers/hwmon
parent5f441e2256506a5878d276399e0a22a13942fe4b (diff)
hwmon: (lm85) Fix error paths in probe function
We must remove all files we created, even in error cases. Fixes second part of kernel bug #34072: https://bugzilla.kernel.org/show_bug.cgi?id=34072 Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm85.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
index b5a6bc48597..da72dc12068 100644
--- a/drivers/hwmon/lm85.c
+++ b/drivers/hwmon/lm85.c
@@ -1331,11 +1331,11 @@ static int lm85_probe(struct i2c_client *client,
if (data->type != emc6d103s) {
err = sysfs_create_group(&client->dev.kobj, &lm85_group_minctl);
if (err)
- goto err_kfree;
+ goto err_remove_files;
err = sysfs_create_group(&client->dev.kobj,
&lm85_group_temp_off);
if (err)
- goto err_kfree;
+ goto err_remove_files;
}
/* The ADT7463/68 have an optional VRM 10 mode where pin 21 is used