summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorLiam Girdwood <lg@opensource.wolfsonmicro.com>2007-01-30 19:18:45 +0300
committerJaroslav Kysela <perex@suse.cz>2007-02-09 11:03:20 +0300
commit18b9b3d99677a758e77682d6849f58fc07e30bef (patch)
treeb37b702d3e450efeb9caf3f2bf2cb081de3f59b5 /sound/soc
parent0cb29ea0d449d7c0ecc9649a08ab63476389701d (diff)
downloadlinux-18b9b3d99677a758e77682d6849f58fc07e30bef.tar.xz
[ALSA] ASoC codec probe failure bug
This patch fixes a bug whereby some resources were not being freed when codec probe() failed. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index cf84d8251715..736949fbb4d5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1234,7 +1234,7 @@ platform_err:
codec_dev->remove(pdev);
cpu_dai_err:
- for (i--; i > 0; i--) {
+ for (i--; i >= 0; i--) {
struct snd_soc_cpu_dai *cpu_dai = machine->dai_link[i].cpu_dai;
if (cpu_dai->remove)
cpu_dai->remove(pdev);