Skip to content
/ linux Public

Commit 19513da

Browse files
Chen NiSasha Levin
authored andcommitted
ASoC: sunxi: sun50i-dmic: Add missing check for devm_regmap_init_mmio
[ Upstream commit 74823db ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d1b6536 commit 19513da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sound/soc/sunxi/sun50i-dmic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,9 @@ static int sun50i_dmic_probe(struct platform_device *pdev)
324324

325325
host->regmap = devm_regmap_init_mmio(&pdev->dev, base,
326326
&sun50i_dmic_regmap_config);
327+
if (IS_ERR(host->regmap))
328+
return dev_err_probe(&pdev->dev, PTR_ERR(host->regmap),
329+
"failed to initialise regmap\n");
327330

328331
/* Clocks */
329332
host->bus_clk = devm_clk_get(&pdev->dev, "bus");

0 commit comments

Comments
 (0)