summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-grgpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/gpio-grgpio.c')
-rw-r--r--drivers/gpio/gpio-grgpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c
index 09daaf2..d5bc70f 100644
--- a/drivers/gpio/gpio-grgpio.c
+++ b/drivers/gpio/gpio-grgpio.c
@@ -121,7 +121,7 @@ static int grgpio_to_irq(struct gpio_chip *gc, unsigned offset)
{
struct grgpio_priv *priv = grgpio_gc_to_priv(gc);
- if (offset > gc->ngpio)
+ if (offset >= gc->ngpio)
return -ENXIO;
if (priv->lirqs[offset].index < 0)