Skip to content

Commit b6c3bdd

Browse files
jhovoldbroonie
authored andcommitted
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: Johan Hovold <johan+linaro@kernel.org> Link: https://lore.kernel.org/r/20230705123018.30903-8-johan+linaro@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent a547582 commit b6c3bdd

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

sound/soc/soc-topology.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
17321732

17331733
ret = snd_soc_add_pcm_runtimes(tplg->comp->card, link, 1);
17341734
if (ret < 0) {
1735-
dev_err(tplg->dev, "ASoC: adding FE link failed\n");
1735+
if (ret != -EPROBE_DEFER)
1736+
dev_err(tplg->dev, "ASoC: adding FE link failed\n");
17361737
goto err;
17371738
}
17381739

@@ -2492,8 +2493,11 @@ static int soc_tplg_process_headers(struct soc_tplg *tplg)
24922493
/* load the header object */
24932494
ret = soc_tplg_load_header(tplg, hdr);
24942495
if (ret < 0) {
2495-
dev_err(tplg->dev,
2496-
"ASoC: topology: could not load header: %d\n", ret);
2496+
if (ret != -EPROBE_DEFER) {
2497+
dev_err(tplg->dev,
2498+
"ASoC: topology: could not load header: %d\n",
2499+
ret);
2500+
}
24972501
return ret;
24982502
}
24992503

0 commit comments

Comments
 (0)