From: Liam Girdwood Date: Tue, 30 Jan 2007 16:18:45 +0000 (+0100) Subject: [ALSA] ASoC codec probe failure bug X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=18b9b3d99677a758e77682d6849f58fc07e30bef;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- 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);