提交 e1328a83 编写于 作者: K Kuninori Morimoto 提交者: Mark Brown

ASoC: core: remove codec from list if registration failed

Current snd_soc_register_codec() adds codec to list, and calls
snd_soc_register_dais().
But, this listed codec should be removed if dais registration
was failed.
Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 2db6be6a
......@@ -4096,6 +4096,10 @@ int snd_soc_register_codec(struct device *dev,
return 0;
fail_codec_name:
mutex_lock(&client_mutex);
list_del(&codec->list);
mutex_unlock(&client_mutex);
kfree(codec->name);
fail_codec:
kfree(codec);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册