Commit b6c3bdda authored by Johan Hovold's avatar Johan Hovold Committed by Mark Brown

ASoC: topology: suppress probe deferral errors

Suppress probe deferral error messages when loading topologies and
creating frontend links to avoid spamming the logs when a component has
not yet been registered:

    snd-sc8280xp sound: ASoC: adding FE link failed
    snd-sc8280xp sound: ASoC: topology: could not load header: -517

Note that dev_err_probe() is not used as the topology component can be
probed and removed while the underlying platform device remains bound to
its driver.
Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230705123018.30903-8-johan+linaro@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a5475829
...@@ -1732,7 +1732,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg, ...@@ -1732,7 +1732,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
ret = snd_soc_add_pcm_runtimes(tplg->comp->card, link, 1); ret = snd_soc_add_pcm_runtimes(tplg->comp->card, link, 1);
if (ret < 0) { if (ret < 0) {
dev_err(tplg->dev, "ASoC: adding FE link failed\n"); if (ret != -EPROBE_DEFER)
dev_err(tplg->dev, "ASoC: adding FE link failed\n");
goto err; goto err;
} }
...@@ -2492,8 +2493,11 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg) ...@@ -2492,8 +2493,11 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg)
/* load the header object */ /* load the header object */
ret = soc_tplg_load_header(tplg, hdr); ret = soc_tplg_load_header(tplg, hdr);
if (ret < 0) { if (ret < 0) {
dev_err(tplg->dev, if (ret != -EPROBE_DEFER) {
"ASoC: topology: could not load header: %d\n", ret); dev_err(tplg->dev,
"ASoC: topology: could not load header: %d\n",
ret);
}
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment