[PATCH] dmaengine: amlogic: Fix regmap error check issue

Xianwei Zhao via B4 Relay devnull+xianwei.zhao.amlogic.com at kernel.org
Thu Oct 15 20:00:17 PDT 2026


From: Xianwei Zhao <xianwei.zhao at amlogic.com>

The func devm_regmap_init_mmio() only returns an error pointer on failure,
Use IS_ERR() instead to make the intent clearer. And Fix the following
compilation issue at the same time.

Smatch warnings:
drivers/dma/amlogic-dma.c:636 aml_dma_probe() warn: passing zero to 'PTR_ERR'

Fixes: b84b5197e344 ("dmaengine: amlogic: Add general DMA driver for A9")
Reported-by: kernel test robot <lkp at intel.com>
Closes: https://lore.kernel.org/r/202610080953.C5TYlCaA-lkp@intel.com/
Reported-by: Dan Carpenter <error27 at gmail.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao at amlogic.com>
---
Fix regmap error check issue.
---
 drivers/dma/amlogic-dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/amlogic-dma.c b/drivers/dma/amlogic-dma.c
index 78ee2337ae71..684121d13fca 100644
--- a/drivers/dma/amlogic-dma.c
+++ b/drivers/dma/amlogic-dma.c
@@ -632,7 +632,7 @@ static int aml_dma_probe(struct platform_device *pdev)
 
 	aml_dma->regmap = devm_regmap_init_mmio(&pdev->dev, aml_dma->base,
 						&aml_regmap_config);
-	if (IS_ERR_OR_NULL(aml_dma->regmap))
+	if (IS_ERR(aml_dma->regmap))
 		return PTR_ERR(aml_dma->regmap);
 
 	aml_dma->clk = devm_clk_get_enabled(&pdev->dev, NULL);

---
base-commit: 42c31fec1ca76b8b5f7759def122d418dff2cd4b
change-id: 20261016-fix-a9-dma-complier-178b6e667983

Best regards,
-- 
Xianwei Zhao <xianwei.zhao at amlogic.com>





More information about the linux-amlogic mailing list