Skip to contentSkip to conversation

ASoC: samsung: spdif: Preserve the original clock acquisition error

PATCH In review [email protected] 2 participants 2 messages Jul 1 – Jul 3

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

PATCH 1/1 ASoC: samsung: spdif: Preserve the original clock acquisition error

From: bui duc phuc <[email protected]>

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.

---
 sound/soc/samsung/spdif.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
sound/soc/samsung/spdif.c +4 -4
index 7fc46d55c522..53eaabaf8956 100644
@@ -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);
Signature · 1 line
2.43.0
maintainer
#1 lore raw
Quoted 1 line · On Wed, 01 Jul 2026 15:05:17 +0700, [email protected] wrote:

ASoC: samsung: spdif: Preserve the original clock acquisition error

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/1] ASoC: samsung: spdif: Preserve the original clock acquisition error
https://git.kernel.org/broonie/sound/c/bb7c62fdbfec

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark