linux/drivers/pinctrl/sirf
Sergei Shtylyov 48e43b3e89 pinctrl: sirf: atlas7: fix of_irq_get() error check
of_irq_get() may return  any negative error number as well as 0 on failure,
while the driver only checks for -EPROBE_DEFER, blithely continuing with
the call to gpiochip_set_chained_irqchip() -- that function expects the
parent IRQ as *unsigned int*, so would probably do nothing  when a large
IRQ number resulting from a conversion of a negative error number is passed
to it, however passing 0 would probably work but the driver won't receive
valid GPIO bank interrupts.

Check for 'ret <= 0' instead and return -ENXIO from the driver's probe iff
of_irq_get() returned 0.

Fixes: f936779329 ("pinctrl: sirf: add sirf atlas7 pinctrl and gpio support")
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-08-14 15:01:02 +02:00
..
Makefile pinctrl: sirf: add sirf atlas7 pinctrl and gpio support 2015-05-19 16:01:30 +02:00
pinctrl-atlas6.c
pinctrl-atlas7.c pinctrl: sirf: atlas7: fix of_irq_get() error check 2017-08-14 15:01:02 +02:00
pinctrl-prima2.c
pinctrl-sirf.c pinctrl: Convert to using %pOF instead of full_name 2017-08-14 15:01:02 +02:00
pinctrl-sirf.h pinctrl: sirf: drop marco support 2015-01-14 14:21:54 +01:00