mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
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:
parent
d39e4e2796
commit
70d0d7b24d
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user