aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/wm8993.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-13 22:11:52 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-14 04:07:47 -0500
commitf6a9336879caeed63e77bc10097966fa3a6ba20c (patch)
tree94b4d4ea37b3cd0c61f0e39df9fb6a9732a16ce2 /sound/soc/codecs/wm8993.c
parentffbf2a363e1867ba5f5869236dda944ec12fe99b (diff)
ASoC: Convert wm8993 to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/wm8993.c')
-rw-r--r--sound/soc/codecs/wm8993.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index f472ea6ecf6b..b966f6979ade 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,
1613 struct wm8993_priv *wm8993; 1613 struct wm8993_priv *wm8993;
1614 int ret; 1614 int ret;
1615 1615
1616 wm8993 = kzalloc(sizeof(struct wm8993_priv), GFP_KERNEL); 1616 wm8993 = devm_kzalloc(&i2c-dev, sizeof(struct wm8993_priv),
1617 GFP_KERNEL);
1617 if (wm8993 == NULL) 1618 if (wm8993 == NULL)
1618 return -ENOMEM; 1619 return -ENOMEM;
1619 1620
@@ -1621,8 +1622,6 @@ static __devinit int wm8993_i2c_probe(struct i2c_client *i2c,
1621 1622
1622 ret = snd_soc_register_codec(&i2c->dev, 1623 ret = snd_soc_register_codec(&i2c->dev,
1623 &soc_codec_dev_wm8993, &wm8993_dai, 1); 1624 &soc_codec_dev_wm8993, &wm8993_dai, 1);
1624 if (ret < 0)
1625 kfree(wm8993);
1626 return ret; 1625 return ret;
1627} 1626}
1628 1627