DMA Engine development
 help / color / mirror / Atom feed
* [PATCH v1] drivers: xilinx: Fix Judgment of the return value of the devm_ioremap_resource function
@ 2023-07-04 12:04 Minjie Du
  2023-07-04 12:15 ` Michal Simek
  2023-07-05 16:47 ` Lizhi Hou
  0 siblings, 2 replies; 3+ messages in thread
From: Minjie Du @ 2023-07-04 12:04 UTC (permalink / raw)
  To: Lizhi Hou, Brian Xu, Raj Kumar Rampelli, Vinod Koul, Michal Simek,
	open list:XILINX XDMA DRIVER,
	moderated list:ARM/ZYNQ ARCHITECTURE, open list
  Cc: opensource.kernel, Minjie Du

IS_ERR() fix devm_ioremap_resource function return judge.
Could you help check it out?
Thank you!

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/dma/xilinx/xdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 93ee298d5..ad5ff6335 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -892,7 +892,7 @@ static int xdma_probe(struct platform_device *pdev)
 	}
 
 	reg_base = devm_ioremap_resource(&pdev->dev, res);
-	if (!reg_base) {
+	if (IS_ERR(reg_base)) {
 		xdma_err(xdev, "ioremap failed");
 		goto failed;
 	}
-- 
2.39.0


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

* Re: [PATCH v1] drivers: xilinx: Fix Judgment of the return value of the devm_ioremap_resource function
  2023-07-04 12:04 [PATCH v1] drivers: xilinx: Fix Judgment of the return value of the devm_ioremap_resource function Minjie Du
@ 2023-07-04 12:15 ` Michal Simek
  2023-07-05 16:47 ` Lizhi Hou
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2023-07-04 12:15 UTC (permalink / raw)
  To: Minjie Du, Lizhi Hou, Brian Xu, Raj Kumar Rampelli, Vinod Koul,
	open list:XILINX XDMA DRIVER,
	moderated list:ARM/ZYNQ ARCHITECTURE, open list
  Cc: opensource.kernel


Start subject with:

dmaengine: xilinx: xdma:

And shorten description in subject.


On 7/4/23 14:04, Minjie Du wrote:
> IS_ERR() fix devm_ioremap_resource function return judge.
> Could you help check it out?
> Thank you!

These two lines shouldn't be the part of commit message.

Also add there.
Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")

Thanks,
Michal

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

* Re: [PATCH v1] drivers: xilinx: Fix Judgment of the return value of the devm_ioremap_resource function
  2023-07-04 12:04 [PATCH v1] drivers: xilinx: Fix Judgment of the return value of the devm_ioremap_resource function Minjie Du
  2023-07-04 12:15 ` Michal Simek
@ 2023-07-05 16:47 ` Lizhi Hou
  1 sibling, 0 replies; 3+ messages in thread
From: Lizhi Hou @ 2023-07-05 16:47 UTC (permalink / raw)
  To: Minjie Du, Brian Xu, Raj Kumar Rampelli, Vinod Koul, Michal Simek,
	open list:XILINX XDMA DRIVER,
	moderated list:ARM/ZYNQ ARCHITECTURE, open list
  Cc: opensource.kernel

Hi Minjie,

There was a patch created for this. Please see

https://lore.kernel.org/all/20230217062652.172480-1-yangyingliang@huawei.com/


Thanks,

Lizhi

On 7/4/23 05:04, Minjie Du wrote:
> IS_ERR() fix devm_ioremap_resource function return judge.
> Could you help check it out?
> Thank you!
>
> Signed-off-by: Minjie Du <duminjie@vivo.com>
> ---
>   drivers/dma/xilinx/xdma.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
> index 93ee298d5..ad5ff6335 100644
> --- a/drivers/dma/xilinx/xdma.c
> +++ b/drivers/dma/xilinx/xdma.c
> @@ -892,7 +892,7 @@ static int xdma_probe(struct platform_device *pdev)
>   	}
>   
>   	reg_base = devm_ioremap_resource(&pdev->dev, res);
> -	if (!reg_base) {
> +	if (IS_ERR(reg_base)) {
>   		xdma_err(xdev, "ioremap failed");
>   		goto failed;
>   	}

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

end of thread, other threads:[~2023-07-05 16:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-04 12:04 [PATCH v1] drivers: xilinx: Fix Judgment of the return value of the devm_ioremap_resource function Minjie Du
2023-07-04 12:15 ` Michal Simek
2023-07-05 16:47 ` Lizhi Hou

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