[tip: irq/drivers] irqchip/aslint-sswi: Fix error check of of_io_request_and_map() result

From: tip-bot2 for Vladimir Kondratiev

Date: Sun Jan 18 2026 - 05:03:00 EST


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

Commit-ID: d9fbb5a1550516faa0d737ea2749e90d2b36d523
Gitweb: https://git.kernel.org/tip/d9fbb5a1550516faa0d737ea2749e90d2b36d523
Author: Vladimir Kondratiev <vladimir.kondratiev@xxxxxxxxxxxx>
AuthorDate: Sun, 18 Jan 2026 10:28:43 +02:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxx>
CommitterDate: Sun, 18 Jan 2026 10:42:02 +01:00

irqchip/aslint-sswi: Fix error check of of_io_request_and_map() result

of_io_request_and_map() returns IOMEM_ERR_PTR() on failure which is
non-NULL.

Fixes: 8a7f030df897 ("irqchip/aslint-sswi: Request IO memory resource")
Reported-by: Chris Mason <clm@xxxxxxxx>
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@xxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxx>
Link: https://patch.msgid.link/20260118082843.2786630-1-vladimir.kondratiev@xxxxxxxxxxxx
Closes: https://lore.kernel.org/all/20260116124257.78357-1-clm@xxxxxxxx
---
drivers/irqchip/irq-aclint-sswi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint-sswi.c
index 325501f..ca06efd 100644
--- a/drivers/irqchip/irq-aclint-sswi.c
+++ b/drivers/irqchip/irq-aclint-sswi.c
@@ -110,8 +110,10 @@ static int __init aclint_sswi_probe(struct fwnode_handle *fwnode)
return -EINVAL;

reg = of_io_request_and_map(to_of_node(fwnode), 0, NULL);
- if (!reg)
- return -ENOMEM;
+ if (IS_ERR(reg)) {
+ pr_err("%pfwP: Failed to map MMIO region\n", fwnode);
+ return PTR_ERR(reg);
+ }

/* Parse SSWI setting */
rc = aclint_sswi_parse_irq(fwnode, reg);