[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <731cca87-0065-0fc3-9f97-28a9ce017c36@amd.com>
Date: Tue, 14 Oct 2025 10:18:00 -0700
From: Lizhi Hou <lizhi.hou@....com>
To: Alexander Stein <alexander.stein@...tq-group.com>, Brian Xu
<brian.xu@....com>, Raj Kumar Rampelli <raj.kumar.rampelli@....com>, "Vinod
Koul" <vkoul@...nel.org>, Michal Simek <michal.simek@....com>, Max Zhen
<max.zhen@....com>, Sonal Santan <sonal.santan@....com>
CC: <dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] dmaengine: xilinx: xdma: Fix regmap init error
handling
Hi Vinod,
This has been reported by multiple users. e.g.
https://lore.kernel.org/dmaengine/CALYqZ9=pVRtSY=w4hG0R3HEM_Y=bpLba2_jRcvcZX4eLX5Yw-A@mail.gmail.com/
https://lore.kernel.org/dmaengine/20240819193641.600176-1-harshit.m.mogalapalli@oracle.com/
Could you help to merge this fix?
Thanks,
Lizhi
On 10/13/25 23:13, Alexander Stein wrote:
> devm_regmap_init_mmio returns an ERR_PTR() upon error, not NULL.
> Fix the error check and also fix the error message. Use the error code
> from ERR_PTR() instead of the wrong value in ret.
>
> Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
> Signed-off-by: Alexander Stein <alexander.stein@...tq-group.com>
> ---
> drivers/dma/xilinx/xdma.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
> index 3d9e92bbc9bb0..c5fe69b98f61d 100644
> --- a/drivers/dma/xilinx/xdma.c
> +++ b/drivers/dma/xilinx/xdma.c
> @@ -1325,8 +1325,8 @@ static int xdma_probe(struct platform_device *pdev)
>
> xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
> &xdma_regmap_config);
> - if (!xdev->rmap) {
> - xdma_err(xdev, "config regmap failed: %d", ret);
> + if (IS_ERR(xdev->rmap)) {
> + xdma_err(xdev, "config regmap failed: %pe", xdev->rmap);
> goto failed;
> }
> INIT_LIST_HEAD(&xdev->dma_dev.channels);
Powered by blists - more mailing lists