]> err.no Git - linux-2.6/commitdiff
[ALSA] ASoC codec probe failure bug
authorLiam Girdwood <lg@opensource.wolfsonmicro.com>
Tue, 30 Jan 2007 16:18:45 +0000 (17:18 +0100)
committerJaroslav Kysela <perex@suse.cz>
Fri, 9 Feb 2007 08:03:20 +0000 (09:03 +0100)
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>
sound/soc/soc-core.c

index cf84d825171544ec21735e66553b42f6051d6ff2..736949fbb4d5536966c0f1f5aadfe1204227a15e 100644 (file)
@@ -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);