]> git.hungrycats.org Git - linux/commitdiff
ASoC: mxs-saif: Use dev_err_probe() for error handling
authorbui duc phuc <phucduc.bui@gmail.com>
Wed, 12 Aug 2026 10:14:16 +0000 (17:14 +0700)
committerMark Brown <broonie@kernel.org>
Wed, 12 Aug 2026 17:37:44 +0000 (18:37 +0100)
Replace dev_err() with dev_err_probe() to prevent log spam when probe
returns -EPROBE_DEFER.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260812101418.37966-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/mxs/mxs-saif.c

index a01a680ad4d71f0b9507b6e0201891f5a7f10b74..b877c978a04c62cb23568309c6e8ba7c8619b966 100644 (file)
@@ -826,12 +826,9 @@ static int mxs_saif_probe(struct platform_device *pdev)
        mxs_saif[saif->id] = saif;
 
        saif->clk = devm_clk_get(&pdev->dev, NULL);
-       if (IS_ERR(saif->clk)) {
-               ret = PTR_ERR(saif->clk);
-               dev_err(&pdev->dev, "Cannot get the clock: %d\n",
-                       ret);
-               return ret;
-       }
+       if (IS_ERR(saif->clk))
+               return dev_err_probe(&pdev->dev, PTR_ERR(saif->clk),
+                                    "Cannot get the clock\n");
 
        saif->base = devm_platform_ioremap_resource(pdev, 0);
        if (IS_ERR(saif->base))