Skip to content

Commit a384f2e

Browse files
vlkondratievThomas Gleixner
authored andcommitted
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: 8a7f030 ("irqchip/aslint-sswi: Request IO memory resource") Reported-by: Chris Mason <clm@meta.com> Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260118082843.2786630-1-vladimir.kondratiev@mobileye.com Closes: https://lore.kernel.org/all/20260116124257.78357-1-clm@meta.com
1 parent a34d398 commit a384f2e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

drivers/irqchip/irq-aclint-sswi.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ static int __init aclint_sswi_probe(struct fwnode_handle *fwnode)
110110
return -EINVAL;
111111

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

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

0 commit comments

Comments
 (0)