[PATCH v3 07/14] ASoC: tegra: Use dev_err_probe() in tegra210_dmic probe

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

Log errors in the Tegra210 DMIC probe path using dev_err_probe().

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

diff --git a/sound/soc/tegra/tegra210_dmic.c b/sound/soc/tegra/tegra210_dmic.c
index 93def7ac4fde..5a4bd5cef30a 100644
--- a/sound/soc/tegra/tegra210_dmic.c
+++ b/sound/soc/tegra/tegra210_dmic.c
@@ -507,10 +507,9 @@ static int tegra210_dmic_probe(struct platform_device *pdev)
dev_set_drvdata(dev, dmic);

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

regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
@@ -528,10 +527,9 @@ static int tegra210_dmic_probe(struct platform_device *pdev)
err = devm_snd_soc_register_component(dev, &tegra210_dmic_compnt,
tegra210_dmic_dais,
ARRAY_SIZE(tegra210_dmic_dais));
- if (err) {
- dev_err(dev, "can't register DMIC component, err: %d\n", err);
- return err;
- }
+ if (err)
+ return dev_err_probe(dev, err,
+ "can't register DMIC component\n");

pm_runtime_enable(dev);

--
2.17.1