Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 17ce252266c7 ("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>

authored by

Alexander Stein and committed by
Vinod Koul
e0adbf74 3f63297f

+2 -2
+2 -2
drivers/dma/xilinx/xdma.c
··· 1234 1234 1235 1235 xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base, 1236 1236 &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); 1239 1239 goto failed; 1240 1240 } 1241 1241 INIT_LIST_HEAD(&xdev->dma_dev.channels);