diff options
| author | Chen Ni <nichen@iscas.ac.cn> | 2026-01-27 11:40:25 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-01-27 12:46:03 +0000 |
| commit | 8ef73c0fbd1e15ead401a74e7114d8d4614a74cf (patch) | |
| tree | de7cf94d458a6870df9ed60607638b9dd5ed9fb5 | |
| parent | 87ee3f05bfe2f5955c2c77ae26a1be236fd615a5 (diff) | |
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>
| -rw-r--r-- | sound/soc/sunxi/sun4i-spdif.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index 1e755a716c63..65de03ca3ad2 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -684,6 +684,10 @@ static int sun4i_spdif_probe(struct platform_device *pdev) host->regmap = devm_regmap_init_mmio(&pdev->dev, base, &sun4i_spdif_regmap_config); + if (IS_ERR(host->regmap)) { + dev_err(&pdev->dev, "failed to initialise regmap.\n"); + return PTR_ERR(host->regmap); + } /* Clocks */ host->apb_clk = devm_clk_get(&pdev->dev, "apb"); |
