Skip to content

Commit 59f6ccd

Browse files
tq-steinagregkh
authored andcommitted
dmaengine: xilinx: xdma: Fix regmap init error handling
[ Upstream commit e0adbf7 ] 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: 17ce252 ("dmaengine: xilinx: xdma: Add xilinx xdma driver") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://patch.msgid.link/20251014061309.283468-1-alexander.stein@ew.tq-group.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 11337b8 commit 59f6ccd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/dma/xilinx/xdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ static int xdma_probe(struct platform_device *pdev)
12361236

12371237
xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
12381238
&xdma_regmap_config);
1239-
if (!xdev->rmap) {
1240-
xdma_err(xdev, "config regmap failed: %d", ret);
1239+
if (IS_ERR(xdev->rmap)) {
1240+
xdma_err(xdev, "config regmap failed: %pe", xdev->rmap);
12411241
goto failed;
12421242
}
12431243
INIT_LIST_HEAD(&xdev->dma_dev.channels);

0 commit comments

Comments
 (0)