diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-12 11:26:00 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-12 12:58:42 +0800 |
commit | 497d496598f411cb7f0690725a0e8b9029cebdb9 (patch) | |
tree | 2e920ebb0934d2bccece1534bf42e5f4b8eedc45 /sound | |
parent | 62e4a13e602214908341fad068ff91f31aed1a4e (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/pxa/hx4700.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index 65c124831a0..c664e33fb6d 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c @@ -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) |