diff options
| author | Axel Lin <axel.lin@gmail.com> | 2011-12-11 22:26:00 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-11 23:58:42 -0500 |
| commit | 497d496598f411cb7f0690725a0e8b9029cebdb9 (patch) | |
| tree | 2e920ebb0934d2bccece1534bf42e5f4b8eedc45 | |
| 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>
| -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 65c124831a00..c664e33fb6d7 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) | |||
| 209 | snd_soc_card_hx4700.dev = &pdev->dev; | 209 | snd_soc_card_hx4700.dev = &pdev->dev; |
| 210 | ret = snd_soc_register_card(&snd_soc_card_hx4700); | 210 | ret = snd_soc_register_card(&snd_soc_card_hx4700); |
| 211 | if (ret) | 211 | if (ret) |
| 212 | return ret; | 212 | gpio_free_array(hx4700_audio_gpios, |
| 213 | ARRAY_SIZE(hx4700_audio_gpios)); | ||
| 213 | 214 | ||
| 214 | return 0; | 215 | return ret; |
| 215 | } | 216 | } |
| 216 | 217 | ||
| 217 | static int __devexit hx4700_audio_remove(struct platform_device *pdev) | 218 | static int __devexit hx4700_audio_remove(struct platform_device *pdev) |
