Skip to contentSkip to conversation

drm/vc4: hdmi: Limit noise when deferring snd card registration

PATCH Applied Nicolas Saenz Julienne 2 participants 2 messages Jun 29, 2021 – Jul 6, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vc4: hdmi: Limit noise when deferring snd card registration

We don't want to print an error message each time devm_snd_soc_register_card() returns -EPROBE_DEFER, the function will most likely succeed some time in the future, once the missing resources are available. So use dev_err_probe(), which will redirect the messages to the debug log level in such case.

---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vc4/vc4_hdmi.c +1 -1
index 04936cd6db8c..32da45821d3a 100644
@@ -1575,7 +1575,7 @@ static int vc4_hdmi_audio_init(struct vc4_hdmi *vc4_hdmi)
 	snd_soc_card_set_drvdata(card, vc4_hdmi);
 	ret = devm_snd_soc_register_card(dev, card);
 	if (ret)
-		dev_err(dev, "Could not register sound card: %d\n", ret);
+		dev_err_probe(dev, ret, "Could not register sound card\n");
 
 	return ret;
 
Signature · 1 line
2.31.1
#1 lore raw
Quoted 7 lines · Nicolas Saenz Julienne

We don't want to print an error message each time devm_snd_soc_register_card() returns -EPROBE_DEFER, the function will most likely succeed some time in the future, once the missing resources are available. So use dev_err_probe(), which will redirect the messages to the debug log level in such case.

Applied, thanks
Maxime