[tip: irq/urgent] irqchip/ls-extirq: Fix devm_of_iomap() error check

From: tip-bot2 for Ioana Ciornei

Date: Tue Feb 24 2026 - 12:37:20 EST


The following commit has been merged into the irq/urgent branch of tip:

Commit-ID: fe5669e363b129cde285bfb4d45abb72d1d77cfc
Gitweb: https://git.kernel.org/tip/fe5669e363b129cde285bfb4d45abb72d1d77cfc
Author: Ioana Ciornei <ioana.ciornei@xxxxxxx>
AuthorDate: Tue, 24 Feb 2026 13:36:10 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Tue, 24 Feb 2026 18:35:49 +01:00

irqchip/ls-extirq: Fix devm_of_iomap() error check

The devm_of_iomap() function returns an ERR_PTR() encoded error code on
failure. Replace the incorrect check against NULL with IS_ERR().

Fixes: 05cd654829dd ("irqchip/ls-extirq: Convert to a platform driver to make it work again")
Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Reviewed-by: Herve Codina <herve.codina@xxxxxxxxxxx>
Link: https://patch.msgid.link/20260224113610.1129022-3-ioana.ciornei@xxxxxxx
Closes: https://lore.kernel.org/all/aYXvfbfT6w0TMsXS@stanley.mountain/
---
drivers/irqchip/irq-ls-extirq.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-ls-extirq.c b/drivers/irqchip/irq-ls-extirq.c
index 96f9c20..d724fe8 100644
--- a/drivers/irqchip/irq-ls-extirq.c
+++ b/drivers/irqchip/irq-ls-extirq.c
@@ -190,8 +190,10 @@ static int ls_extirq_probe(struct platform_device *pdev)
return dev_err_probe(dev, -ENOMEM, "Failed to allocate memory\n");

priv->intpcr = devm_of_iomap(dev, node, 0, NULL);
- if (!priv->intpcr)
- return dev_err_probe(dev, -ENOMEM, "Cannot ioremap OF node %pOF\n", node);
+ if (IS_ERR(priv->intpcr)) {
+ return dev_err_probe(dev, PTR_ERR(priv->intpcr),
+ "Cannot ioremap OF node %pOF\n", node);
+ }

ret = ls_extirq_parse_map(priv, node);
if (ret)