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>
This commit is contained in:
parent
5ff7ada748
commit
8faab941be
1 changed files with 4 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Reference in a new issue