[PATCH v3 06/10] ASoC: ti: omap-dmic: Use dev_err_probe() for error handling
[email protected] Thu, 16 Jul 2026 17:39:07 +0700
| Newsgroups | org.kernel.vger.linux-omap,org.kernel.vger.linux-kernel,org.kernel.vger.linux-sound |
|---|---|
| Message-ID | <[email protected]> |
From: bui duc phuc <[email protected]> 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 <[email protected]> --- 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