alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/14] ASoC: Convert alc5623 to devm_kzalloc()
@ 2011-12-29  3:56 Axel Lin
  2011-12-29  3:58 ` [PATCH 02/14] ASoC: Convert cs4270 " Axel Lin
                   ` (13 more replies)
  0 siblings, 14 replies; 18+ messages in thread
From: Axel Lin @ 2011-12-29  3:56 UTC (permalink / raw)
  To: alsa-devel; +Cc: Mark Brown, Liam Girdwood, Arnaud Patard

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 sound/soc/codecs/alc5623.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/alc5623.c b/sound/soc/codecs/alc5623.c
index 6a9b621..3feee56 100644
--- a/sound/soc/codecs/alc5623.c
+++ b/sound/soc/codecs/alc5623.c
@@ -1022,7 +1022,8 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 
 	dev_dbg(&client->dev, "Found codec id : alc56%02x\n", vid2);
 
-	alc5623 = kzalloc(sizeof(struct alc5623_priv), GFP_KERNEL);
+	alc5623 = devm_kzalloc(&client->dev, sizeof(struct alc5623_priv),
+			       GFP_KERNEL);
 	if (alc5623 == NULL)
 		return -ENOMEM;
 
@@ -1044,7 +1045,6 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 		alc5623_dai.name = "alc5623-hifi";
 		break;
 	default:
-		kfree(alc5623);
 		return -EINVAL;
 	}
 
@@ -1053,20 +1053,15 @@ static int alc5623_i2c_probe(struct i2c_client *client,
 
 	ret =  snd_soc_register_codec(&client->dev,
 		&soc_codec_device_alc5623, &alc5623_dai, 1);
-	if (ret != 0) {
+	if (ret != 0)
 		dev_err(&client->dev, "Failed to register codec: %d\n", ret);
-		kfree(alc5623);
-	}
 
 	return ret;
 }
 
 static int alc5623_i2c_remove(struct i2c_client *client)
 {
-	struct alc5623_priv *alc5623 = i2c_get_clientdata(client);
-
 	snd_soc_unregister_codec(&client->dev);
-	kfree(alc5623);
 	return 0;
 }
 
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2012-01-02 12:29 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 14/14] ASoC: Convert tpa6130a2 " Axel Lin
2012-01-02 12:29 ` [PATCH 01/14] ASoC: Convert alc5623 " Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).