Skip to content

Commit

Permalink
ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_car…
Browse files Browse the repository at this point in the history
…d fails

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Dec 12, 2011
1 parent 62e4a13 commit 497d496
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/pxa/hx4700.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 497d496

Please sign in to comment.