sound/soc/sunxi/sun50i-dmic.c | 3 +++ 1 file changed, 3 insertions(+)
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>
---
sound/soc/sunxi/sun50i-dmic.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sound/soc/sunxi/sun50i-dmic.c b/sound/soc/sunxi/sun50i-dmic.c
index bab1e29c9988..69d2478ffc95 100644
--- a/sound/soc/sunxi/sun50i-dmic.c
+++ b/sound/soc/sunxi/sun50i-dmic.c
@@ -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");
--
2.25.1
On Tue, 27 Jan 2026 11:32:50 +0800, Chen Ni wrote:
> Add check for the return value of devm_regmap_init_mmio() and return the
> error if it fails in order to catch the error.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: sunxi: sun50i-dmic: Add missing check for devm_regmap_init_mmio
commit: 74823db9ba2e13f3ec007b354759b3d8125e462c
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
> Add check for the return value of devm_regmap_init_mmio() and return the > error if it fails in order to catch the error. How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? Regards, Markus
© 2016 - 2026 Red Hat, Inc.