Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315977
b: refs/heads/master
c: 20f426f
h: refs/heads/master
i:
  315975: 59b520a
v: v3
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent 7857db2 commit 784a337
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: c087f73a249154ed83e451343d9eff0f299291a3
refs/heads/master: 20f426ff028202b2c0df947a3468ed4717f598d6
12 changes: 4 additions & 8 deletions trunk/drivers/hwmon/lm90.c
Original file line number Diff line number Diff line change
Expand Up @@ -1399,11 +1399,10 @@ static int lm90_probe(struct i2c_client *client,
struct lm90_data *data;
int err;

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

i2c_set_clientdata(client, data);
mutex_init(&data->update_lock);

Expand Down Expand Up @@ -1474,8 +1473,6 @@ static int lm90_probe(struct i2c_client *client,
lm90_remove_files(client, data);
exit_restore:
lm90_restore_conf(client, data);
kfree(data);
exit:
return err;
}

Expand All @@ -1487,7 +1484,6 @@ static int lm90_remove(struct i2c_client *client)
lm90_remove_files(client, data);
lm90_restore_conf(client, data);

kfree(data);
return 0;
}

Expand Down

0 comments on commit 784a337

Please sign in to comment.