[PATCH v3 02/14] ASoC: tegra: Use dev_err_probe() in tegra186_dspk probe

Sheetal
2026-03-25T10:15:35Z

Log errors in the Tegra186 DSPK probe path using dev_err_probe().

Signed-off-by: Sheetal <sheetal@nvidia.com>
---
sound/soc/tegra/tegra186_dspk.c | 15 ++++++--------
1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/sound/soc/tegra/tegra186_dspk.c b/sound/soc/tegra/tegra186_dspk.c
index 8816e4967331..1aa94c98294a 100644
--- a/sound/soc/tegra/tegra186_dspk.c
+++ b/sound/soc/tegra/tegra186_dspk.c
@@ -496,10 +496,9 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
dev_set_drvdata(dev, dspk);

dspk->clk_dspk = devm_clk_get(dev, "dspk");
- if (IS_ERR(dspk->clk_dspk)) {
- dev_err(dev, "can't retrieve DSPK clock\n");
- return PTR_ERR(dspk->clk_dspk);
- }
+ if (IS_ERR(dspk->clk_dspk))
+ return dev_err_probe(dev, PTR_ERR(dspk->clk_dspk),
+ "can't retrieve DSPK clock\n");

regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
@@ -516,11 +515,9 @@ static int tegra186_dspk_platform_probe(struct platform_device *pdev)
err = devm_snd_soc_register_component(dev, &tegra186_dspk_cmpnt,
tegra186_dspk_dais,
ARRAY_SIZE(tegra186_dspk_dais));
- if (err) {
- dev_err(dev, "can't register DSPK component, err: %d\n",
- err);
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err,
+ "can't register DSPK component\n");

pm_runtime_enable(dev);

--
2.17.1