ASoC: sunxi: sun50i-dmic: Add missing check for devm_regmap_init_mmio

Add check for the return value of devm_regmap_init_mmio() and return the
error if it fails in order to catch the error.

Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
Link: https://patch.msgid.link/20260127033250.2044608-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Chen Ni 2026-01-27 11:32:50 +08:00 committed by Mark Brown
parent 8ef73c0fbd
commit 74823db9ba
No known key found for this signature in database
GPG key ID: 24D68B725D5487D0

View file

@ -358,6 +358,9 @@ static int sun50i_dmic_probe(struct platform_device *pdev)
host->regmap = devm_regmap_init_mmio(&pdev->dev, base,
&sun50i_dmic_regmap_config);
if (IS_ERR(host->regmap))
return dev_err_probe(&pdev->dev, PTR_ERR(host->regmap),
"failed to initialise regmap\n");
/* Clocks */
host->bus_clk = devm_clk_get(&pdev->dev, "bus");