[PATCH v3 05/14] ASoC: tegra: Use dev_err_probe() in tegra210_ahub probe

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

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

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

diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index 43a45f785d5b..4626dd0a4d55 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -2265,10 +2265,9 @@ static int tegra_ahub_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ahub);

ahub->clk = devm_clk_get(&pdev->dev, "ahub");
- if (IS_ERR(ahub->clk)) {
- dev_err(&pdev->dev, "can't retrieve AHUB clock\n");
- return PTR_ERR(ahub->clk);
- }
+ if (IS_ERR(ahub->clk))
+ return dev_err_probe(&pdev->dev, PTR_ERR(ahub->clk),
+ "can't retrieve AHUB clock\n");

regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(regs))
@@ -2287,16 +2286,15 @@ static int tegra_ahub_probe(struct platform_device *pdev)
ahub->soc_data->cmpnt_drv,
ahub->soc_data->dai_drv,
ahub->soc_data->num_dais);
- if (err) {
- dev_err(&pdev->dev, "can't register AHUB component, err: %d\n",
- err);
- return err;
- }
+ if (err)
+ return dev_err_probe(&pdev->dev, err,
+ "can't register AHUB component\n");

pm_runtime_enable(&pdev->dev);

err = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
if (err) {
pm_runtime_disable(&pdev->dev);
- return err;
+ return dev_err_probe(&pdev->dev, err,
+ "failed to populate child nodes\n");
}
--
2.17.1