提交 714a8438 编写于 作者: R Ricard Wanderlof 提交者: Greg Kroah-Hartman

ASoC: Fail card instantiation if DAI format setup fails

[ Upstream commit 40aa5383e393d72f6aa3943a4e7b1aae25a1e43b ]

If the DAI format setup fails, there is no valid communication format
between CPU and CODEC, so fail card instantiation, rather than continue
with a card that will most likely not function properly.
Signed-off-by: NRicard Wanderlof <ricardw@axis.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.20.1907241132350.6338@lnxricardw1.se.axis.comSigned-off-by: NMark Brown <broonie@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
上级 bd2f4c7c
...@@ -1513,8 +1513,11 @@ static int soc_probe_link_dais(struct snd_soc_card *card, ...@@ -1513,8 +1513,11 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
} }
} }
if (dai_link->dai_fmt) if (dai_link->dai_fmt) {
snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt); ret = snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
if (ret)
return ret;
}
ret = soc_post_component_init(rtd, dai_link->name); ret = soc_post_component_init(rtd, dai_link->name);
if (ret) if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册