Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Chen Ni and committed by
Mark Brown
74823db9 8ef73c0f

+3
+3
sound/soc/sunxi/sun50i-dmic.c
··· 358 358 359 359 host->regmap = devm_regmap_init_mmio(&pdev->dev, base, 360 360 &sun50i_dmic_regmap_config); 361 + if (IS_ERR(host->regmap)) 362 + return dev_err_probe(&pdev->dev, PTR_ERR(host->regmap), 363 + "failed to initialise regmap\n"); 361 364 362 365 /* Clocks */ 363 366 host->bus_clk = devm_clk_get(&pdev->dev, "bus");