The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] ASoC: samsung: i2s: Use dev_err_probe() for iis clock error
@ 2026-07-01  8:43 phucduc.bui
  0 siblings, 0 replies; only message in thread
From: phucduc.bui @ 2026-07-01  8:43 UTC (permalink / raw)
  To: Sylwester Nawrocki, Liam Girdwood, Mark Brown, Jaroslav Kysela
  Cc: Takashi Iwai, linux-sound, linux-kernel, bui duc phuc

From: bui duc phuc <phucduc.bui@gmail.com>

Switch the iis clock error path to dev_err_probe(). This folds the
dev_err() and return into a single statement and, when devm_clk_get()
returns -EPROBE_DEFER, avoids logging a spurious error on every probe
retry while still recording the reason in the deferred-probe debugfs.

No functional change other than the demoted log level on deferred
probe; the returned error code is unchanged.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
 sound/soc/samsung/i2s.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c
index f80f697a5d55..68fff67b9660 100644
--- a/sound/soc/samsung/i2s.c
+++ b/sound/soc/samsung/i2s.c
@@ -1448,10 +1448,10 @@ static int samsung_i2s_probe(struct platform_device *pdev)
 	regs_base = res->start;
 
 	priv->clk = devm_clk_get(&pdev->dev, "iis");
-	if (IS_ERR(priv->clk)) {
-		dev_err(&pdev->dev, "Failed to get iis clock\n");
-		return PTR_ERR(priv->clk);
-	}
+	if (IS_ERR(priv->clk))
+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk),
+				     "Failed to get iis clock\n");
+
 
 	ret = clk_prepare_enable(priv->clk);
 	if (ret != 0) {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-01  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01  8:43 [PATCH] ASoC: samsung: i2s: Use dev_err_probe() for iis clock error phucduc.bui

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox