提交 8faab941 编写于 作者: A Axel Lin 提交者: Mark Brown

ASoC: Fix error handling in e800_init to free gpios

Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 5ff7ada7
......@@ -136,8 +136,10 @@ static int __init e800_init(void)
goto free_spk_amp_gpio;
e800_snd_device = platform_device_alloc("soc-audio", -1);
if (!e800_snd_device)
return -ENOMEM;
if (!e800_snd_device) {
ret = -ENOMEM;
goto free_spk_amp_gpio;
}
platform_set_drvdata(e800_snd_device, &e800);
ret = platform_device_add(e800_snd_device);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册