From: phucduc.bui@gmail.com
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
bui duc phuc <phucduc.bui@gmail.com>
Subject: [PATCH] ASoC: samsung: spdif: Preserve the original clock acquisition error
Date: Wed, 1 Jul 2026 15:05:17 +0700 [thread overview]
Message-ID: <20260701080517.298294-1-phucduc.bui@gmail.com> (raw)
From: bui duc phuc <phucduc.bui@gmail.com>
devm_clk_get() may return different error codes, including -EPROBE_DEFER.
The current code overwrites the original error with -ENOENT, preventing
deferred probing from working correctly.
Replace dev_err() with dev_err_probe() so the original error code is
preserved and propagated to the caller.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
---
sound/soc/samsung/spdif.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 7fc46d55c522..53eaabaf8956 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -380,8 +380,8 @@ static int spdif_probe(struct platform_device *pdev)
spdif->pclk = devm_clk_get(&pdev->dev, "spdif");
if (IS_ERR(spdif->pclk)) {
- dev_err(&pdev->dev, "failed to get peri-clock\n");
- ret = -ENOENT;
+ ret = dev_err_probe(&pdev->dev, PTR_ERR(spdif->pclk),
+ "failed to get peri-clock\n");
goto err0;
}
ret = clk_prepare_enable(spdif->pclk);
@@ -390,8 +390,8 @@ static int spdif_probe(struct platform_device *pdev)
spdif->sclk = devm_clk_get(&pdev->dev, "sclk_spdif");
if (IS_ERR(spdif->sclk)) {
- dev_err(&pdev->dev, "failed to get internal source clock\n");
- ret = -ENOENT;
+ ret = dev_err_probe(&pdev->dev, PTR_ERR(spdif->sclk),
+ "failed to get internal source clock\n");
goto err1;
}
ret = clk_prepare_enable(spdif->sclk);
--
2.43.0
next reply other threads:[~2026-07-01 8:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 8:05 phucduc.bui [this message]
2026-07-02 19:01 ` [PATCH] ASoC: samsung: spdif: Preserve the original clock acquisition error Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260701080517.298294-1-phucduc.bui@gmail.com \
--to=phucduc.bui@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=s.nawrocki@samsung.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.