summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ftgpio010.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-ftgpio010.c')
-rw-r--r--drivers/gpio/gpio-ftgpio010.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-ftgpio010.c b/drivers/gpio/gpio-ftgpio010.c
index 7b3394fdc624..b7a3a2db699b 100644
--- a/drivers/gpio/gpio-ftgpio010.c
+++ b/drivers/gpio/gpio-ftgpio010.c
@@ -176,8 +176,8 @@ static int ftgpio_gpio_probe(struct platform_device *pdev)
return PTR_ERR(g->base);
irq = platform_get_irq(pdev, 0);
- if (!irq)
- return -EINVAL;
+ if (irq <= 0)
+ return irq ? irq : -EINVAL;
ret = bgpio_init(&g->gc, dev, 4,
g->base + GPIO_DATA_IN,