summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorChen Ni2026-01-27 11:32:50 +0800
committerSasha Levin2026-03-04 07:20:42 -0500
commit19513daa8d13ecdcc5eadbed80d0e85ea5d1847d (patch)
tree10c3b8c735ab70e77f81c4aef81d0141954d6a89 /sound
parentd1b6536ac20d32225523ea99efa105260f7c9ee6 (diff)
ASoC: sunxi: sun50i-dmic: Add missing check for devm_regmap_init_mmio
[ Upstream commit 74823db9ba2e13f3ec007b354759b3d8125e462c ] 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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/sunxi/sun50i-dmic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c
index 2599683a582d..9071bc483575 100644
--- a/sound/soc/sunxi/sun50i-dmic.c
+++ b/sound/soc/sunxi/sun50i-dmic.c
@@ -324,6 +324,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");