mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dmaengine: amlogic: Fix regmap error check issue
@ 2026-10-16  3:00 Xianwei Zhao via B4 Relay
  2026-10-16 14:46 ` Frank Li
  2026-10-17  9:56 ` Vinod Koul
  0 siblings, 2 replies; 3+ 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>



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

* Re: [PATCH] dmaengine: amlogic: Fix regmap error check issue
  2026-10-16  3:00 [PATCH] dmaengine: amlogic: Fix regmap error check issue Xianwei Zhao via B4 Relay
@ 2026-10-16 14:46 ` Frank Li
  2026-10-17  9:56 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Frank Li @ 2026-10-16 14:46 UTC (permalink / raw)
  To: xianwei.zhao
  Cc: Vinod Koul, Frank Li, linux-amlogic, dmaengine, linux-kernel,
	kernel test robot, Dan Carpenter

On Fri, Oct 16, 2026 at 03:00:17AM +0000, Xianwei Zhao via B4 Relay wrote:
> 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>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.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>
>
>

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

* Re: [PATCH] dmaengine: amlogic: Fix regmap error check issue
  2026-10-16  3:00 [PATCH] dmaengine: amlogic: Fix regmap error check issue Xianwei Zhao via B4 Relay
  2026-10-16 14:46 ` Frank Li
@ 2026-10-17  9:56 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2026-10-17  9:56 UTC (permalink / raw)
  To: Frank Li, Xianwei Zhao
  Cc: linux-amlogic, dmaengine, linux-kernel, kernel test robot, Dan Carpenter


On Fri, 16 Oct 2026 03:00:17 +0000, Xianwei Zhao wrote:
> 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'
> 
> [...]

Applied, thanks!

[1/1] dmaengine: amlogic: Fix regmap error check issue
      commit: aff5e6a77fc69a7c490246465940d18422d7c631

Best regards,
-- 
~Vinod



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

end of thread, other threads:[~2026-10-17  9:56 UTC | newest]

Thread overview: 3+ 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 14:46 ` Frank Li
2026-10-17  9:56 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®