diff options
Diffstat (limited to 'drivers/of/gpio.c')
-rw-r--r-- | drivers/of/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/of/gpio.c b/drivers/of/gpio.c index bba81216b4db..bf984b6dc477 100644 --- a/drivers/of/gpio.c +++ b/drivers/of/gpio.c | |||
@@ -140,7 +140,7 @@ int of_gpio_simple_xlate(struct gpio_chip *gc, | |||
140 | if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) | 140 | if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells)) |
141 | return -EINVAL; | 141 | return -EINVAL; |
142 | 142 | ||
143 | if (gpiospec->args[0] > gc->ngpio) | 143 | if (gpiospec->args[0] >= gc->ngpio) |
144 | return -EINVAL; | 144 | return -EINVAL; |
145 | 145 | ||
146 | if (flags) | 146 | if (flags) |