diff options
author | Shengjiu Wang <shengjiu.wang@nxp.com> | 2022-02-10 14:19:12 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-20 10:06:39 +0300 |
commit | dbde6c30c8626ba4f27a9baf131ac30c325ccdf1 (patch) | |
tree | dab862f551ef8205a9b2cafef79dd9c827a154f0 | |
parent | f19432a59267fc54634c00781bc721e4f58c281b (diff) | |
download | linux-dbde6c30c8626ba4f27a9baf131ac30c325ccdf1.tar.xz |
ASoC: soc-core: skip zero num_dai component in searching dai name
[ Upstream commit f7d344a2bd5ec81fbd1ce76928fd059e57ec9bea ]
In the case like dmaengine which's not a dai but as a component, the
num_dai is zero, dmaengine component has the same component_of_node
as cpu dai, when cpu dai component is not ready, but dmaengine component
is ready, try to get cpu dai name, the snd_soc_get_dai_name() return
-EINVAL, not -EPROBE_DEFER, that cause below error:
asoc-simple-card <card name>: parse error -22
asoc-simple-card: probe of <card name> failed with error -22
The sound card failed to probe.
So this patch fixes the issue above by skipping the zero num_dai
component in searching dai name.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1644491952-7457-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | sound/soc/soc-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 0344d4423167..81c3aa167038 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3799,7 +3799,7 @@ static int snd_soc_get_dai_name(struct of_phandle_args *args, if (!component_of_node && pos->dev->parent) component_of_node = pos->dev->parent->of_node; - if (component_of_node != args->np) + if (component_of_node != args->np || !pos->num_dai) continue; if (pos->driver->of_xlate_dai_name) { |