diff options
author | NeilBrown <neilb@suse.de> | 2012-08-01 20:40:02 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-08-01 20:40:02 +1000 |
commit | bb181e2e48f8c85db08c9cb015cbba9618dbf05c (patch) | |
tree | 191bc24dd97bcb174535cc217af082f16da3b43d /drivers/hwmon/tmp401.c | |
parent | d57368afe63b3b7b45ce6c2b8c5276417935be2f (diff) | |
parent | c039c332f23e794deb6d6f37b9f07ff3b27fb2cf (diff) |
Merge commit 'c039c332f23e794deb6d6f37b9f07ff3b27fb2cf' into md
Pull in pre-requisites for adding raid10 support to dm-raid.
Diffstat (limited to 'drivers/hwmon/tmp401.c')
-rw-r--r-- | drivers/hwmon/tmp401.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/tmp401.c b/drivers/hwmon/tmp401.c index ea54c338467..e6205487516 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c @@ -594,7 +594,6 @@ static int tmp401_remove(struct i2c_client *client) &tmp411_attr[i].dev_attr); } - kfree(data); return 0; } @@ -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; @@ -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; } |