[PATCH V2 10/11] soc: ti: knav_dma: Use IOMEM_ERR_PTR() in pktdma_get_regs()
Nishanth Menon
nm at ti.com
Tue May 12 10:06:22 PDT 2026
pktdma_get_regs() returns a void __iomem * but uses ERR_PTR() on the
error path, causing sparse to warn about an address space mismatch.
Replace ERR_PTR() with IOMEM_ERR_PTR() to resolve the warning cleanly.
Signed-off-by: Nishanth Menon <nm at ti.com>
---
Changes since V1:
- None.
V1: https://lore.kernel.org/all/20260508153211.3688277-11-nm@ti.com/
drivers/soc/ti/knav_dma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
index 7ba6fd58e9ce..96df3982e47b 100644
--- a/drivers/soc/ti/knav_dma.c
+++ b/drivers/soc/ti/knav_dma.c
@@ -520,7 +520,7 @@ static void __iomem *pktdma_get_regs(struct knav_dma_device *dma,
if (ret) {
dev_err(dev, "Can't translate of node(%pOFn) address for index(%d)\n",
node, index);
- return ERR_PTR(ret);
+ return IOMEM_ERR_PTR(ret);
}
regs = devm_ioremap_resource(kdev->dev, &res);
--
2.47.0
More information about the linux-arm-kernel
mailing list