mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
ASoC: Fail card instantiation if DAI format setup fails
[ Upstream commit 40aa5383e3
]
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: Ricard Wanderlof <ricardw@axis.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.20.1907241132350.6338@lnxricardw1.se.axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
16c832681f
commit
a56c79efe4
1 changed files with 5 additions and 2 deletions
|
@ -1757,8 +1757,11 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
|
|||
}
|
||||
}
|
||||
|
||||
if (dai_link->dai_fmt)
|
||||
snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
|
||||
if (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);
|
||||
if (ret)
|
||||
|
|
Loading…
Reference in a new issue