From b215caca714ed1c3b41c4dc6a055454e28e9e6a1 Mon Sep 17 00:00:00 2001 From: bui duc phuc Date: Wed, 12 Aug 2026 17:14:16 +0700 Subject: ASoC: mxs-saif: Use dev_err_probe() for error handling Replace dev_err() with dev_err_probe() to prevent log spam when probe returns -EPROBE_DEFER. Signed-off-by: bui duc phuc Reviewed-by: Frank Li Link: https://patch.msgid.link/20260812101418.37966-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown --- sound/soc/mxs/mxs-saif.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index a01a680ad4d7..b877c978a04c 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -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)) -- cgit v1.2.3 From f0701e5fc299e4ff2cb80c1f00bf2f23b94d6b8a Mon Sep 17 00:00:00 2001 From: bui duc phuc Date: Wed, 12 Aug 2026 17:14:17 +0700 Subject: ASoC: mxs-saif: Drop redundant probe error messages The functions called here don't log the error themselves, but the error is already reported deeper in the call chain, so the dev_err() calls are redundant and can be removed. Signed-off-by: bui duc phuc Link: https://patch.msgid.link/20260812101418.37966-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown --- sound/soc/mxs/mxs-saif.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sound/soc/mxs/mxs-saif.c b/sound/soc/mxs/mxs-saif.c index b877c978a04c..a77cd516a1bf 100644 --- a/sound/soc/mxs/mxs-saif.c +++ b/sound/soc/mxs/mxs-saif.c @@ -841,10 +841,8 @@ static int mxs_saif_probe(struct platform_device *pdev) saif->dev = &pdev->dev; ret = devm_request_irq(&pdev->dev, irq, mxs_saif_irq, 0, dev_name(&pdev->dev), saif); - if (ret) { - dev_err(&pdev->dev, "failed to request irq\n"); + if (ret) return ret; - } platform_set_drvdata(pdev, saif); @@ -857,16 +855,12 @@ static int mxs_saif_probe(struct platform_device *pdev) ret = devm_snd_soc_register_component(&pdev->dev, &mxs_saif_component, &mxs_saif_dai, 1); - if (ret) { - dev_err(&pdev->dev, "register DAI failed\n"); + if (ret) return ret; - } ret = mxs_pcm_platform_register(&pdev->dev); - if (ret) { - dev_err(&pdev->dev, "register PCM failed: %d\n", ret); + if (ret) return ret; - } return 0; } -- cgit v1.2.3 From e84c06775d4a3508b8068bc84986b4a29e27b1d3 Mon Sep 17 00:00:00 2001 From: bui duc phuc Date: Wed, 12 Aug 2026 17:14:18 +0700 Subject: ASoC: mxs-sgtl5000: Drop redundant probe error messages Remove the probe error messages to avoid duplicate error reporting, since the error is already reported by the called functions. Signed-off-by: bui duc phuc Reviewed-by: Daniel Baluta Reviewed-by: Frank Li Link: https://patch.msgid.link/20260812101418.37966-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown --- sound/soc/mxs/mxs-sgtl5000.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c index f1c0e612313d..a253a48ca59c 100644 --- a/sound/soc/mxs/mxs-sgtl5000.c +++ b/sound/soc/mxs/mxs-sgtl5000.c @@ -155,8 +155,6 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev) ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); if (ret) { - dev_err(&pdev->dev, "failed to parse audio-routing (%d)\n", - ret); mxs_saif_put_mclk(0); return ret; } -- cgit v1.2.3