summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-tz1090.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2014-11-14 13:32:56 -0800
committerLinus Walleij <linus.walleij@linaro.org>2014-11-27 14:34:47 +0100
commit842e528e1abf1edaa6467c6dbda299ec724cb42a (patch)
treecc91183b4010bf35c73bd80395654def52f68d47 /drivers/gpio/gpio-tz1090.c
parentd0c3d95ae27a54f283a7acc5ead5bd8a15441a92 (diff)
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: Dmitry Torokhov <dtor@chromium.org> Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-tz1090.c')
-rw-r--r--drivers/gpio/gpio-tz1090.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-tz1090.c b/drivers/gpio/gpio-tz1090.c
index 5246a60eff6d..6107d0682fd6 100644
--- a/drivers/gpio/gpio-tz1090.c
+++ b/drivers/gpio/gpio-tz1090.c
@@ -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);
/* 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",
info->index);
return 0;