Skip to content

Commit

Permalink
[ALSA] ASoC codec probe failure bug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liam Girdwood authored and Jaroslav Kysela committed Feb 9, 2007
1 parent 0cb29ea commit 18b9b3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ static int soc_probe(struct platform_device *pdev)
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);
Expand Down

0 comments on commit 18b9b3d

Please sign in to comment.