diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-07-24 22:31:09 -0600 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-07-24 22:34:40 -0600 |
commit | 6aeea3ecc33b1f36dbc3b80461d15a7052ae424f (patch) | |
tree | bbd273e3e0ca76094aed8e9c77e5adfe2b07f779 /drivers/hwmon/tmp401.c | |
parent | 9844a5524ec532aee826c35e3031637c7fc8287b (diff) | |
parent | bdc0077af574800d24318b6945cf2344e8dbb050 (diff) |
Merge remote-tracking branch 'origin' into irqdomain/next
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; } |