[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250908122206.1315473-1-linyujun809@h-partners.com>
Date: Mon, 8 Sep 2025 20:22:06 +0800
From: Lin Yujun <linyujun809@...artners.com>
To: <lizhi.hou@....com>, <brian.xu@....com>, <raj.kumar.rampelli@....com>,
<vkoul@...nel.org>, <michal.simek@....com>, <sonal.santan@....com>,
<max.zhen@....com>
CC: <dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH -next] dmaengine: Fix incorrect handling for return value of devm_regmap_init_mmio.
The devm_regmap_init_mmio() is described as follows:
"The return value will be an ERR_PTR() on error or a valid pointer"
Use IS_ERR() to fix incorrect handling return value
of devm_regmap_init_mmio.
Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
Signed-off-by: Lin Yujun <linyujun809@...artners.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 0d88b1a670e1..5db8f077dcc0 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -1234,11 +1234,11 @@ static int xdma_probe(struct platform_device *pdev)
goto failed;
}
xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
&xdma_regmap_config);
- if (!xdev->rmap) {
+ if (IS_ERR(xdev->rmap)) {
xdma_err(xdev, "config regmap failed: %d", ret);
goto failed;
}
INIT_LIST_HEAD(&xdev->dma_dev.channels);
--
2.34.1
Powered by blists - more mailing lists