Commit f6a93368 authored by Mark Brown's avatar Mark Brown

ASoC: Convert wm8993 to devm_kzalloc()

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ffbf2a36
...@@ -1613,7 +1613,8 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c, ...@@ -1613,7 +1613,8 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
struct wm8993_priv *wm8993; struct wm8993_priv *wm8993;
int ret; int ret;
wm8993 = kzalloc(sizeof(struct wm8993_priv), GFP_KERNEL); wm8993 = devm_kzalloc(&i2c-dev, sizeof(struct wm8993_priv),
GFP_KERNEL);
if (wm8993 == NULL) if (wm8993 == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -1621,8 +1622,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c, ...@@ -1621,8 +1622,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
ret = snd_soc_register_codec(&i2c->dev, ret = snd_soc_register_codec(&i2c->dev,
&soc_codec_dev_wm8993, &wm8993_dai, 1); &soc_codec_dev_wm8993, &wm8993_dai, 1);
if (ret < 0)
kfree(wm8993);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment