Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326157
b: refs/heads/master
c: 57457e3
h: refs/heads/master
i:
  326155: 90ea993
v: v3
  • Loading branch information
Guenter Roeck committed Sep 24, 2012
1 parent 7aa6190 commit d409d44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08940b8aba8ded377e546c12c5b932364c0a03cc
refs/heads/master: 57457e314eefc7bce93854918a234e4ac9a52922
12 changes: 4 additions & 8 deletions trunk/drivers/hwmon/ads1015.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ static int ads1015_remove(struct i2c_client *client)
hwmon_device_unregister(data->hwmon_dev);
for (k = 0; k < ADS1015_CHANNELS; ++k)
device_remove_file(&client->dev, &ads1015_in[k].dev_attr);
kfree(data);
return 0;
}

Expand Down Expand Up @@ -254,11 +253,10 @@ static int ads1015_probe(struct i2c_client *client,
int err;
unsigned int k;

data = kzalloc(sizeof(struct ads1015_data), GFP_KERNEL);
if (!data) {
err = -ENOMEM;
goto exit;
}
data = devm_kzalloc(&client->dev, sizeof(struct ads1015_data),
GFP_KERNEL);
if (!data)
return -ENOMEM;

i2c_set_clientdata(client, data);
mutex_init(&data->update_lock);
Expand All @@ -284,8 +282,6 @@ static int ads1015_probe(struct i2c_client *client,
exit_remove:
for (k = 0; k < ADS1015_CHANNELS; ++k)
device_remove_file(&client->dev, &ads1015_in[k].dev_attr);
kfree(data);
exit:
return err;
}

Expand Down

0 comments on commit d409d44

Please sign in to comment.