diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2017-07-21 19:30:39 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2017-07-21 23:58:55 +0200 |
commit | 531da74075a7805768ce3cd323e37e3548cbf6c5 (patch) | |
tree | 501d1ab022709371d88f85cf85a6201ba43600f8 /drivers/of | |
parent | scripts/dtc: dtx_diff - update include dts paths to match build (diff) | |
download | linux-531da74075a7805768ce3cd323e37e3548cbf6c5.tar.xz linux-531da74075a7805768ce3cd323e37e3548cbf6c5.zip |
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: 7a4228bbff76 ("of: irq: use of_irq_get() in of_irq_to_resource()")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/irq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 6ce72aa65425..ab21c846eb27 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c @@ -476,7 +476,7 @@ int of_irq_to_resource_table(struct device_node *dev, struct resource *res, int i; for (i = 0; i < nr_irqs; i++, res++) - if (!of_irq_to_resource(dev, i, res)) + if (of_irq_to_resource(dev, i, res) <= 0) break; return i; |