summaryrefslogtreecommitdiff
path: root/drivers/ide/pdc202xx_old.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>2017-07-30 22:38:48 +0300
committerLinus Walleij <linus.walleij@linaro.org>2017-08-14 16:01:02 +0300
commit48e43b3e895fc6115f3c525a33d91666e58aad14 (patch)
tree65a2bb63db8f024126ff2a150456fe1e8572c5c0 /drivers/ide/pdc202xx_old.c
parent5fdd1a6a098ddebd83bc7fb47b7f6040b8663ebe (diff)
downloadlinux-48e43b3e895fc6115f3c525a33d91666e58aad14.tar.xz
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: f9367793293d ("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>
Diffstat (limited to 'drivers/ide/pdc202xx_old.c')
0 files changed, 0 insertions, 0 deletions