Commit 497d4965 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

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

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 62e4a13e
...@@ -209,9 +209,10 @@ static int __devinit hx4700_audio_probe(struct platform_device *pdev) ...@@ -209,9 +209,10 @@ static int __devinit hx4700_audio_probe(struct platform_device *pdev)
snd_soc_card_hx4700.dev = &pdev->dev; snd_soc_card_hx4700.dev = &pdev->dev;
ret = snd_soc_register_card(&snd_soc_card_hx4700); ret = snd_soc_register_card(&snd_soc_card_hx4700);
if (ret) 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) static int __devexit hx4700_audio_remove(struct platform_device *pdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment