From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 5/8] ASoC: Convert wm8993 to devm_kzalloc()
Date: Wed, 14 Dec 2011 17:00:51 +0800 [thread overview]
Message-ID: <1323853254-9020-5-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1323853254-9020-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8993.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index f472ea6..b966f69 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1613,7 +1613,8 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
struct wm8993_priv *wm8993;
int ret;
- wm8993 = kzalloc(sizeof(struct wm8993_priv), GFP_KERNEL);
+ wm8993 = devm_kzalloc(&i2c-dev, sizeof(struct wm8993_priv),
+ GFP_KERNEL);
if (wm8993 == NULL)
return -ENOMEM;
@@ -1621,8 +1622,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8993, &wm8993_dai, 1);
- if (ret < 0)
- kfree(wm8993);
return ret;
}
--
1.7.7.3
next prev parent reply other threads:[~2011-12-14 9:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 9:00 [PATCH 1/8] ASoC: Remove cache default for volatile wm9081 reset register Mark Brown
2011-12-14 9:00 ` [PATCH 2/8] ASoC: Use standard snd_soc_cache_sync() for WM9090 Mark Brown
2011-12-14 9:00 ` [PATCH 3/8] ASoC: Convert WM9090 to use regmap directly Mark Brown
2011-12-14 9:00 ` [PATCH 4/8] ASoC: Move WM9090 device identification and reset to I2C probe Mark Brown
2011-12-14 9:00 ` Mark Brown [this message]
2011-12-14 9:00 ` [PATCH 6/8] ASoC: Use standard register cache sync in wm8993 Mark Brown
2011-12-14 9:00 ` [PATCH 7/8] ASoC: Convert wm8993 to direct regmap API usage Mark Brown
2011-12-14 9:00 ` [PATCH 8/8] ASoC: Move WM8993 resource acquisition and device reset to bus probe 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=1323853254-9020-5-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@ti.com \
--cc=patches@opensource.wolfsonmicro.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 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).