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:
ffbf2a3
)
ASoC: Convert wm8993 to devm_kzalloc()
author
Mark Brown
<
[email protected]
>
Wed, 14 Dec 2011 03:11:52 +0000
(11:11 +0800)
committer
Mark Brown
<
[email protected]
>
Wed, 14 Dec 2011 09:07:47 +0000
(17:07 +0800)
Signed-off-by: Mark Brown <
[email protected]
>
sound/soc/codecs/wm8993.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/wm8993.c
b/sound/soc/codecs/wm8993.c
index f472ea6ecf6b29febb42b0ffd837720821750376..b966f6979adee78fc97bb1105f0f360382b53c29 100644
(file)
--- 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;
}