Skip to content

Commit 497d496

Browse files
AxelLinbroonie
authored andcommitted
ASoC: Fix hx4700 error handling to free gpios if snd_soc_register_card fails
Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 62e4a13 commit 497d496

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sound/soc/pxa/hx4700.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,10 @@ static int __devinit hx4700_audio_probe(struct platform_device *pdev)
209209
snd_soc_card_hx4700.dev = &pdev->dev;
210210
ret = snd_soc_register_card(&snd_soc_card_hx4700);
211211
if (ret)
212-
return ret;
212+
gpio_free_array(hx4700_audio_gpios,
213+
ARRAY_SIZE(hx4700_audio_gpios));
213214

214-
return 0;
215+
return ret;
215216
}
216217

217218
static int __devexit hx4700_audio_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)