Commit 8faab941 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

ASoC: Fix error handling in e800_init to free gpios

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 5ff7ada7
...@@ -136,8 +136,10 @@ static int __init e800_init(void) ...@@ -136,8 +136,10 @@ static int __init e800_init(void)
goto free_spk_amp_gpio; goto free_spk_amp_gpio;
e800_snd_device = platform_device_alloc("soc-audio", -1); e800_snd_device = platform_device_alloc("soc-audio", -1);
if (!e800_snd_device) if (!e800_snd_device) {
return -ENOMEM; ret = -ENOMEM;
goto free_spk_amp_gpio;
}
platform_set_drvdata(e800_snd_device, &e800); platform_set_drvdata(e800_snd_device, &e800);
ret = platform_device_add(e800_snd_device); ret = platform_device_add(e800_snd_device);
......
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