All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: amlogic: Fix regmap error check issue
@ 2026-10-16  3:00 ` Xianwei Zhao
  0 siblings, 0 replies; 9+ messages in thread
From: Xianwei Zhao via B4 Relay @ 2026-10-16  3:00 UTC (permalink / raw)
  To: Vinod Koul, Frank Li
  Cc: linux-amlogic, dmaengine, linux-kernel, kernel test robot,
	Dan Carpenter, Xianwei Zhao

From: Xianwei Zhao <xianwei.zhao@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@intel.com>
Closes: https://lore.kernel.org/r/202610080953.C5TYlCaA-lkp@intel.com/
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Xianwei Zhao <xianwei.zhao@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@amlogic.com>



_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-10-16 14:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-16  3:00 [PATCH] dmaengine: amlogic: Fix regmap error check issue Xianwei Zhao via B4 Relay
2026-10-16  3:00 ` Xianwei Zhao via B4 Relay
2026-10-16  3:00 ` Xianwei Zhao
2026-10-16  3:08 ` sashiko-bot
2026-10-16  3:08   ` sashiko-bot
2026-10-16  6:41   ` Xianwei Zhao
2026-10-16  6:41     ` Xianwei Zhao
2026-10-16 14:46 ` Frank Li
2026-10-16 14:46   ` Frank Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.