aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/tmp401.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2012-09-19 10:21:21 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-09-19 10:21:21 -0700
commit0b6c404a07e3240b95aa5682fb8fd57c41609d7a (patch)
treec4d410b0ec7044922b73c39ecfb3fbb620c29282 /drivers/hwmon/tmp401.c
parent609455f481772c5a875b88e860a2ee0e2f25ebf0 (diff)
parent55d512e245bc7699a8800e23df1a24195dd08217 (diff)
Merge tag 'v3.6-rc5' into for-linus
Sync with mainline so that I can revert an input patch that came in through another subsystem tree.
Diffstat (limited to 'drivers/hwmon/tmp401.c')
-rw-r--r--drivers/hwmon/tmp401.c6
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;
}