Skip to content

Commit 9787b3d

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 97e777f commit 9787b3d

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

12411241
xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
12421242
&xdma_regmap_config);
1243-
if (!xdev->rmap) {
1244-
xdma_err(xdev, "config regmap failed: %d", ret);
1243+
if (IS_ERR(xdev->rmap)) {
1244+
xdma_err(xdev, "config regmap failed: %pe", xdev->rmap);
12451245
goto failed;
12461246
}
12471247
INIT_LIST_HEAD(&xdev->dma_dev.channels);

0 commit comments

Comments
 (0)