Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315993
b: refs/heads/master
c: 747e5d6
h: refs/heads/master
i:
  315991: b5ce633
v: v3
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent 4deebcd commit 581a36b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 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: c38b2820cb4014b86b0bf45f334d3436c03b14be
refs/heads/master: 747e5d62ac85b9706739d2e21b1722f68d797da0
7 changes: 2 additions & 5 deletions trunk/drivers/hwmon/lm85.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ static int lm85_probe(struct i2c_client *client,
struct lm85_data *data;
int err;

data = kzalloc(sizeof(struct lm85_data), GFP_KERNEL);
data = devm_kzalloc(&client->dev, sizeof(struct lm85_data), GFP_KERNEL);
if (!data)
return -ENOMEM;

Expand Down Expand Up @@ -1419,7 +1419,7 @@ static int lm85_probe(struct i2c_client *client,
/* Register sysfs hooks */
err = sysfs_create_group(&client->dev.kobj, &lm85_group);
if (err)
goto err_kfree;
return err;

/* minctl and temp_off exist on all chips except emc6d103s */
if (data->type != emc6d103s) {
Expand Down Expand Up @@ -1466,8 +1466,6 @@ static int lm85_probe(struct i2c_client *client,
/* Error out and cleanup code */
err_remove_files:
lm85_remove_files(client, data);
err_kfree:
kfree(data);
return err;
}

Expand All @@ -1476,7 +1474,6 @@ static int lm85_remove(struct i2c_client *client)
struct lm85_data *data = i2c_get_clientdata(client);
hwmon_device_unregister(data->hwmon_dev);
lm85_remove_files(client, data);
kfree(data);
return 0;
}

Expand Down

0 comments on commit 581a36b

Please sign in to comment.