Commit 842e528e authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Linus Walleij

gpio: tz1090: Fix error handling of irq_of_parse_and_map

irq_of_parse_and_map() returns 0 on error, so testing for negative
result never works.
Signed-off-by: default avatarDmitry Torokhov <dtor@chromium.org>
Acked-by: default avatarJames Hogan <james.hogan@imgtec.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent d0c3d95a
...@@ -446,7 +446,7 @@ static int tz1090_gpio_bank_probe(struct tz1090_gpio_bank_info *info) ...@@ -446,7 +446,7 @@ static int tz1090_gpio_bank_probe(struct tz1090_gpio_bank_info *info)
bank->irq = irq_of_parse_and_map(np, 0); bank->irq = irq_of_parse_and_map(np, 0);
/* The interrupt is optional (it may be used by another core on chip) */ /* The interrupt is optional (it may be used by another core on chip) */
if (bank->irq < 0) { if (!bank->irq) {
dev_info(dev, "IRQ not provided for bank %u, IRQs disabled\n", dev_info(dev, "IRQ not provided for bank %u, IRQs disabled\n",
info->index); info->index);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment