]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
soc: ti: knav_dma: Use IOMEM_ERR_PTR() in pktdma_get_regs()
authorNishanth Menon <nm@ti.com>
Tue, 12 May 2026 17:06:22 +0000 (12:06 -0500)
committerNishanth Menon <nm@ti.com>
Fri, 22 May 2026 15:55:55 +0000 (10:55 -0500)
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.

Reviewed-by: Sai Sree Kartheek Adivi <s-adivi@ti.com>
Reviewed-by: Hari Prasath Gujulan Elango <gehariprasath@ti.com>
Link: https://patch.msgid.link/20260512170623.3174416-11-nm@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/knav_dma.c

index 7ba6fd58e9ce2c54836041e8c8fe29a07883d54e..96df3982e47bdbcdf0e5b3c9a54a3519564a8c88 100644 (file)
@@ -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);