Skip to content

Commit 531da74

Browse files
Sergei Shtylyovrobherring
authored andcommitted
of: irq: fix of_irq_to_resource() error check
of_irq_to_resource() has recently been fixed to return negative error #'s along with 0, however of_irq_to_resource_table() still only regards 0 as invalid IRQ -- fix it up. Fixes: 7a4228b ("of: irq: use of_irq_get() in of_irq_to_resource()") Signed-off-by: Sergei Shtylyov <[email protected]> Signed-off-by: Rob Herring <[email protected]>
1 parent b4b201d commit 531da74

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/of/irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ int of_irq_to_resource_table(struct device_node *dev, struct resource *res,
476476
int i;
477477

478478
for (i = 0; i < nr_irqs; i++, res++)
479-
if (!of_irq_to_resource(dev, i, res))
479+
if (of_irq_to_resource(dev, i, res) <= 0)
480480
break;
481481

482482
return i;

0 commit comments

Comments
 (0)