ASoC: tegra: tegra20_das: Use dev_err_probe() for error handling

Replace the existing dev_err() and PTR_ERR() sequence with
dev_err_probe(), preserving the original error code while simplifying
the error handling.

Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260715051115.17385-2-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
bui duc phuc 2026-07-15 12:11:12 +07:00 committed by Mark Brown
parent d39e4e2796
commit 70d0d7b24d
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -167,10 +167,9 @@ static int tegra20_das_probe(struct platform_device *pdev)
das->regmap = devm_regmap_init_mmio(&pdev->dev, regs,
&tegra20_das_regmap_config);
if (IS_ERR(das->regmap)) {
dev_err(&pdev->dev, "regmap init failed\n");
return PTR_ERR(das->regmap);
}
if (IS_ERR(das->regmap))
return dev_err_probe(&pdev->dev, PTR_ERR(das->regmap),
"regmap init failed\n");
tegra20_das_connect_dap_to_dac(das, TEGRA20_DAS_DAP_ID_1,
TEGRA20_DAS_DAP_SEL_DAC1);