Skip to content

Commit e0adbf7

Browse files
tq-steinavinodkoul
authored andcommitted
dmaengine: xilinx: xdma: Fix regmap init error handling
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>
1 parent 3f63297 commit e0adbf7

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
@@ -1234,8 +1234,8 @@ static int xdma_probe(struct platform_device *pdev)
12341234

12351235
xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
12361236
&xdma_regmap_config);
1237-
if (!xdev->rmap) {
1238-
xdma_err(xdev, "config regmap failed: %d", ret);
1237+
if (IS_ERR(xdev->rmap)) {
1238+
xdma_err(xdev, "config regmap failed: %pe", xdev->rmap);
12391239
goto failed;
12401240
}
12411241
INIT_LIST_HEAD(&xdev->dma_dev.channels);

0 commit comments

Comments
 (0)