Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316008
b: refs/heads/master
c: 0df9fc7
h: refs/heads/master
v: v3
  • Loading branch information
Guenter Roeck committed Jul 22, 2012
1 parent 733c493 commit 6dfba96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: f511a21f4ea7d4410241e15db5cb05a287812582
refs/heads/master: 0df9fc7bb8ced5e6fc16a0141d2ee8f6f0eea61c
6 changes: 3 additions & 3 deletions trunk/drivers/hwmon/tmp401.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,6 @@ static int tmp401_remove(struct i2c_client *client)
&tmp411_attr[i].dev_attr);
}

kfree(data);
return 0;
}

Expand All @@ -605,7 +604,8 @@ static int tmp401_probe(struct i2c_client *client,
struct tmp401_data *data;
const char *names[] = { "TMP401", "TMP411" };

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

Expand Down Expand Up @@ -646,7 +646,7 @@ static int tmp401_probe(struct i2c_client *client,
return 0;

exit_remove:
tmp401_remove(client); /* will also free data for us */
tmp401_remove(client);
return err;
}

Expand Down

0 comments on commit 6dfba96

Please sign in to comment.