From 18b9b3d99677a758e77682d6849f58fc07e30bef Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 30 Jan 2007 17:18:45 +0100 Subject: [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 --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound') diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index cf84d825171..736949fbb4d 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); -- cgit v1.2.3-18-g5258