[PATCH v2 06/10] ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
From: phucduc . bui
Date: Thu Jul 16 2026 - 05:14:26 EST
From: bui duc phuc <phucduc.bui@xxxxxxxxx>
Replace dev_err() with dev_err_probe() when handling clock lookup
failures. This preserves the original error code and suppresses
unnecessary deferred probe error messages.
Signed-off-by: bui duc phuc <phucduc.bui@xxxxxxxxx>
---
sound/soc/ti/omap-dmic.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/soc/ti/omap-dmic.c b/sound/soc/ti/omap-dmic.c
index b795b9f66b0e..c8d791f05ae4 100644
--- a/sound/soc/ti/omap-dmic.c
+++ b/sound/soc/ti/omap-dmic.c
@@ -465,10 +465,9 @@ static int asoc_dmic_probe(struct platform_device *pdev)
mutex_init(&dmic->mutex);
dmic->fclk = devm_clk_get(dmic->dev, "fck");
- if (IS_ERR(dmic->fclk)) {
- dev_err(dmic->dev, "can't get fck\n");
- return -ENODEV;
- }
+ if (IS_ERR(dmic->fclk))
+ return dev_err_probe(dmic->dev, PTR_ERR(dmic->fclk),
+ "can't get fck\n");
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dma");
if (!res) {
--
2.43.0