diff options
| author | bui duc phuc <phucduc.bui@gmail.com> | 2026-07-15 16:55:25 +0700 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-29 15:29:34 +0100 |
| commit | bb0d825c8ad9d35abcb4b4f88d8ca91b0755ee4b (patch) | |
| tree | 9129bee6d6024a8d81e359e9ba30cdf19cdc6ae7 | |
| parent | 76a770c30bcdb0447247c578e0283336a20b6990 (diff) | |
| download | linux-next-bb0d825c8ad9d35abcb4b4f88d8ca91b0755ee4b.tar.gz linux-next-bb0d825c8ad9d35abcb4b4f88d8ca91b0755ee4b.zip | |
ASoC: sunxi: sun8i-codec-analog: Improve probe error handling
Drop the redundant error message after devm_platform_ioremap_resource(),
which already reports failures, and use dev_err_probe() for regmap
initialization errors.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Reviewed-by: Chen-Yu Tsai <wens@kernel.org>
Link: https://patch.msgid.link/20260715095525.40668-7-phucduc.bui@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/sunxi/sun8i-codec-analog.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c index 2024e2b2553e..3335855c6311 100644 --- a/sound/soc/sunxi/sun8i-codec-analog.c +++ b/sound/soc/sunxi/sun8i-codec-analog.c @@ -822,16 +822,13 @@ static int sun8i_codec_analog_probe(struct platform_device *pdev) void __iomem *base; base = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(base)) { - dev_err(&pdev->dev, "Failed to map the registers\n"); + if (IS_ERR(base)) return PTR_ERR(base); - } regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base); - if (IS_ERR(regmap)) { - dev_err(&pdev->dev, "Failed to create regmap\n"); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(&pdev->dev, PTR_ERR(regmap), + "Failed to create regmap\n"); return devm_snd_soc_register_component(&pdev->dev, &sun8i_codec_analog_cmpnt_drv, |
