dect
/
linux-2.6
Archived
13
0
Fork 0

ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Axel Lin 2011-12-12 11:26:00 +08:00 committed by Mark Brown
parent 62e4a13e60
commit 497d496598
1 changed files with 3 additions and 2 deletions

View File

@ -209,9 +209,10 @@ static int __devinit hx4700_audio_probe(struct platform_device *pdev)
snd_soc_card_hx4700.dev = &pdev->dev;
ret = snd_soc_register_card(&snd_soc_card_hx4700);
if (ret)
return ret;
gpio_free_array(hx4700_audio_gpios,
ARRAY_SIZE(hx4700_audio_gpios));
return 0;
return ret;
}
static int __devexit hx4700_audio_remove(struct platform_device *pdev)