linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe
@ 2022-09-11 14:57 Mikhail Rudenko
  2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Mikhail Rudenko @ 2022-09-11 14:57 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Kuninori Morimoto
  Cc: Mikhail Rudenko, alsa-devel, linux-arm-kernel, linux-sunxi, linux-kernel

In the case when a codec device is probed before codec analog
controls, snd_soc_register_card() returns -EPROBE_DEFER, resulting in
a misleading error message

    sun4i-codec 1c22c00.codec: Failed to register our card

even if the device is probed successfully later. Use dev_err_probe()
to demote the above error to a debug message.

Signed-off-by: Mikhail Rudenko <mike.rudenko@gmail.com>
---
 sound/soc/sunxi/sun4i-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 60712f24ade5..01b461c64d68 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1825,7 +1825,7 @@ static int sun4i_codec_probe(struct platform_device *pdev)
 
 	ret = snd_soc_register_card(card);
 	if (ret) {
-		dev_err(&pdev->dev, "Failed to register our card\n");
+		dev_err_probe(&pdev->dev, ret, "Failed to register our card\n");
 		goto err_assert_reset;
 	}
 
-- 
2.37.3


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-09-19 23:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-11 14:57 [PATCH 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
2022-09-11 14:57 ` [PATCH 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
2022-09-12 16:15   ` Jernej Škrabec
2022-09-13 16:04   ` Mark Brown
2022-09-13 21:22     ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mikhail Rudenko
2022-09-13 21:22       ` [PATCH v2 2/2] ASoC: sunxi: sun4i-codec: set debugfs_prefix for CPU DAI component Mikhail Rudenko
2022-09-19 23:10       ` [PATCH v2 1/2] ASoC: sunxi: sun4i-codec: silence misleading error in probe Mark Brown
2022-09-12 16:14 ` [PATCH " Jernej Škrabec
2022-09-14  9:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).