projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a54877d
)
ASoC: Convert tpa6130a2 to devm_kzalloc()
author
Axel Lin
<
[email protected]
>
Thu, 29 Dec 2011 04:12:29 +0000
(12:12 +0800)
committer
Mark Brown
<
[email protected]
>
Mon, 2 Jan 2012 12:28:13 +0000
(12:28 +0000)
Signed-off-by: Axel Lin <
[email protected]
>
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/codecs/tpa6130a2.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/tpa6130a2.c
b/sound/soc/codecs/tpa6130a2.c
index 7eeca79d738784e612a3cca65bb15faa67a0a4b8..363b99dad8e9539e09cc29134e7d215243dddbc8 100644
(file)
--- a/
sound/soc/codecs/tpa6130a2.c
+++ b/
sound/soc/codecs/tpa6130a2.c
@@
-376,7
+376,7
@@
static int __devinit tpa6130a2_probe(struct i2c_client *client,
return -ENODEV;
}
- data =
kzalloc(
sizeof(*data), GFP_KERNEL);
+ data =
devm_kzalloc(&client->dev,
sizeof(*data), GFP_KERNEL);
if (data == NULL) {
dev_err(dev, "Can not allocate memory\n");
return -ENOMEM;
@@
-450,7
+450,6
@@
err_regulator:
if (data->power_gpio >= 0)
gpio_free(data->power_gpio);
err_gpio:
- kfree(data);
tpa6130a2_client = NULL;
return ret;
@@
-466,8
+465,6
@@
static int __devexit tpa6130a2_remove(struct i2c_client *client)
gpio_free(data->power_gpio);
regulator_put(data->supply);
-
- kfree(data);
tpa6130a2_client = NULL;
return 0;