diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-03 02:26:33 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-03 02:26:33 -0400 |
commit | c50e86ce7c2961a41f2f7aa6e4fd6c99229ba205 (patch) | |
tree | 4ea36009719bd8fc523239fe1bdccb90f0dce3ae /drivers/hwmon/tmp401.c | |
parent | 14d33d384693eb6083396199de516fdef320f7af (diff) | |
parent | 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d (diff) |
Merge tag 'v3.6-rc4'
Merge 3.6-rc4 to get latest OMAP and device tree fixes.
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 ea54c3384671..e62054875164 100644 --- a/drivers/hwmon/tmp401.c +++ b/drivers/hwmon/tmp401.c | |||
@@ -594,7 +594,6 @@ static int tmp401_remove(struct i2c_client *client) | |||
594 | &tmp411_attr[i].dev_attr); | 594 | &tmp411_attr[i].dev_attr); |
595 | } | 595 | } |
596 | 596 | ||
597 | kfree(data); | ||
598 | return 0; | 597 | return 0; |
599 | } | 598 | } |
600 | 599 | ||
@@ -605,7 +604,8 @@ static int tmp401_probe(struct i2c_client *client, | |||
605 | struct tmp401_data *data; | 604 | struct tmp401_data *data; |
606 | const char *names[] = { "TMP401", "TMP411" }; | 605 | const char *names[] = { "TMP401", "TMP411" }; |
607 | 606 | ||
608 | data = kzalloc(sizeof(struct tmp401_data), GFP_KERNEL); | 607 | data = devm_kzalloc(&client->dev, sizeof(struct tmp401_data), |
608 | GFP_KERNEL); | ||
609 | if (!data) | 609 | if (!data) |
610 | return -ENOMEM; | 610 | return -ENOMEM; |
611 | 611 | ||
@@ -646,7 +646,7 @@ static int tmp401_probe(struct i2c_client *client, | |||
646 | return 0; | 646 | return 0; |
647 | 647 | ||
648 | exit_remove: | 648 | exit_remove: |
649 | tmp401_remove(client); /* will also free data for us */ | 649 | tmp401_remove(client); |
650 | return err; | 650 | return err; |
651 | } | 651 | } |
652 | 652 | ||