summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-05 09:16:07 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-05 09:16:07 -0400
commita8ea54da5e47bde9ba19230bb3609b0502a288c3 (patch)
tree6b7bb369d86ab185e4a30a0d58ce485f9a00e7e8 /sound/soc/soc-core.c
parent11e16eb365f4f6979cfcb2a2d379338b383590d9 (diff)
parent6424dca23e6b5a2f7a19a69cf7c0990b11717b00 (diff)
Merge branch 'for-2.6.37' into HEAD
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 4360436ef03..2198936cfb6 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3062,8 +3062,10 @@ int snd_soc_register_dais(struct device *dev,
for (i = 0; i < count; i++) {
dai = kzalloc(sizeof(struct snd_soc_dai), GFP_KERNEL);
- if (dai == NULL)
- return -ENOMEM;
+ if (dai == NULL) {
+ ret = -ENOMEM;
+ goto err;
+ }
/* create DAI component name */
dai->name = fmt_multiple_name(dev, &dai_drv[i]);
@@ -3282,9 +3284,6 @@ int snd_soc_register_codec(struct device *dev,
return 0;
error:
- for (i--; i >= 0; i--)
- snd_soc_unregister_dai(dev);
-
if (codec->reg_cache)
kfree(codec->reg_cache);
kfree(codec->name);