Sergei Shtylyov b9f27afbc0 PCI: faraday: Fix of_irq_get() error check
of_irq_get() may return a negative error number as well as 0 on failure,
while the driver only checks for 0, blithely continuing with the call to
irq_set_chained_handler_and_data() -- that function expects *unsigned int*
so should probably do nothing when a large IRQ number resulting from a
conversion of a negative error number is passed to it. The driver then
probes successfully while being only partly functional...

Check for 'irq <= 0' instead and propagate the negative error number to the
probe method --  that will allow the deferred probing as well.

Fixes: d3c68e0a7e34 ("PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
2017-08-16 11:42:28 -05:00
..
2017-07-14 13:15:49 +02:00
2017-05-08 19:03:25 -07:00
2017-07-02 16:14:27 -05:00
2017-07-08 15:51:57 -07:00
2017-07-14 13:15:49 +02:00
2017-07-08 15:51:57 -07:00
2014-06-10 20:20:19 -06:00
2017-07-14 13:15:49 +02:00
2017-07-14 13:15:49 +02:00
2016-11-29 18:05:09 -06:00
2017-01-14 11:37:18 +01:00
2016-06-20 13:24:20 -05:00