From: Axel Lin <axel.lin@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>,
Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>,
Mark@alsa-project.org
Subject: [PATCH 14/14] ASoC: Convert tpa6130a2 to devm_kzalloc()
Date: Thu, 29 Dec 2011 12:12:29 +0800 [thread overview]
Message-ID: <1325131949.19977.20.camel@phoenix> (raw)
In-Reply-To: <1325130983.19977.2.camel@phoenix>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/tpa6130a2.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c
index 7eeca79..363b99d 100644
--- 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;
--
1.7.5.4
next prev parent reply other threads:[~2011-12-29 4:12 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 3:56 [PATCH 01/14] ASoC: Convert alc5623 to devm_kzalloc() Axel Lin
2011-12-29 3:58 ` [PATCH 02/14] ASoC: Convert cs4270 " Axel Lin
2011-12-29 15:52 ` Tabi Timur-B04825
2011-12-29 18:17 ` Mark Brown
2011-12-29 18:49 ` Tabi Timur-B04825
2011-12-29 4:00 ` [PATCH 03/14] ASoC: Convert cs42l51 " Axel Lin
2011-12-29 4:01 ` [PATCH 04/14] ASoC: Convert max98088 " Axel Lin
2011-12-29 4:02 ` [PATCH 05/14] ASoC: Convert max98095 " Axel Lin
2011-12-29 4:03 ` [PATCH 06/14] ASoC: Convert max9850 " Axel Lin
2011-12-29 4:04 ` [PATCH 07/14] ASoC: Convert rt5631 " Axel Lin
2011-12-29 4:05 ` [PATCH 08/14] ASoC: Convert ssm2602 " Axel Lin
2011-12-29 4:06 ` [PATCH 09/14] ASoC: Convert sta32x " Axel Lin
2011-12-29 4:07 ` [PATCH 10/14] ASoC: Convert tlv320aic23 " Axel Lin
2011-12-29 4:08 ` [PATCH 11/14] ASoC: Convert tlv320aic26 " Axel Lin
2011-12-29 4:10 ` [PATCH 12/14] ASoC: Convert tlv320aic3x " Axel Lin
2011-12-29 4:11 ` [PATCH 13/14] ASoC: Convert tlv320dac33 " Axel Lin
2011-12-29 4:12 ` Axel Lin [this message]
2012-01-02 12:29 ` [PATCH 01/14] ASoC: Convert alc5623 " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1325131949.19977.20.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=Mark@alsa-project.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=peter.ujfalusi@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.