mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +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: 8a7f030df8 ("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
This commit is contained in:
parent
a34d398c83
commit
a384f2ed88
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue