diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-12-06 21:01:30 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-07 11:14:19 -0500 |
commit | 8faab941bec7af1c1865db316ac2f37c78071271 (patch) | |
tree | d0c564f43aab29da0eb82b3c117b118c72e4f386 /sound/soc/pxa/e800_wm9712.c | |
parent | 5ff7ada748fe2f74f525893577c4418bfdaf6d4f (diff) |
ASoC: Fix error handling in e800_init to free gpios
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/pxa/e800_wm9712.c')
-rw-r--r-- | sound/soc/pxa/e800_wm9712.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 6a8f38b6c379..26e02322f10b 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c | |||
@@ -136,8 +136,10 @@ static int __init e800_init(void) | |||
136 | goto free_spk_amp_gpio; | 136 | goto free_spk_amp_gpio; |
137 | 137 | ||
138 | e800_snd_device = platform_device_alloc("soc-audio", -1); | 138 | e800_snd_device = platform_device_alloc("soc-audio", -1); |
139 | if (!e800_snd_device) | 139 | if (!e800_snd_device) { |
140 | return -ENOMEM; | 140 | ret = -ENOMEM; |
141 | goto free_spk_amp_gpio; | ||
142 | } | ||
141 | 143 | ||
142 | platform_set_drvdata(e800_snd_device, &e800); | 144 | platform_set_drvdata(e800_snd_device, &e800); |
143 | ret = platform_device_add(e800_snd_device); | 145 | ret = platform_device_add(e800_snd_device); |