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: sun4i-spdif: 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/20260127034025.2044669-1-nichen@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Chen Ni and committed by
Mark Brown
8ef73c0f 87ee3f05

+4
+4
sound/soc/sunxi/sun4i-spdif.c
··· 684 684 685 685 host->regmap = devm_regmap_init_mmio(&pdev->dev, base, 686 686 &sun4i_spdif_regmap_config); 687 + if (IS_ERR(host->regmap)) { 688 + dev_err(&pdev->dev, "failed to initialise regmap.\n"); 689 + return PTR_ERR(host->regmap); 690 + } 687 691 688 692 /* Clocks */ 689 693 host->apb_clk = devm_clk_get(&pdev->dev, "apb");