diff options
-rw-r--r-- | drivers/hwmon/ads1015.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/ads1015.c b/drivers/hwmon/ads1015.c index eedca3cf9968..dd87ae96c262 100644 --- a/drivers/hwmon/ads1015.c +++ b/drivers/hwmon/ads1015.c | |||
@@ -271,7 +271,7 @@ static int ads1015_probe(struct i2c_client *client, | |||
271 | continue; | 271 | continue; |
272 | err = device_create_file(&client->dev, &ads1015_in[k].dev_attr); | 272 | err = device_create_file(&client->dev, &ads1015_in[k].dev_attr); |
273 | if (err) | 273 | if (err) |
274 | goto exit_free; | 274 | goto exit_remove; |
275 | } | 275 | } |
276 | 276 | ||
277 | data->hwmon_dev = hwmon_device_register(&client->dev); | 277 | data->hwmon_dev = hwmon_device_register(&client->dev); |
@@ -285,7 +285,6 @@ static int ads1015_probe(struct i2c_client *client, | |||
285 | exit_remove: | 285 | exit_remove: |
286 | for (k = 0; k < ADS1015_CHANNELS; ++k) | 286 | for (k = 0; k < ADS1015_CHANNELS; ++k) |
287 | device_remove_file(&client->dev, &ads1015_in[k].dev_attr); | 287 | device_remove_file(&client->dev, &ads1015_in[k].dev_attr); |
288 | exit_free: | ||
289 | kfree(data); | 288 | kfree(data); |
290 | exit: | 289 | exit: |
291 | return err; | 290 | return err; |