From 5a42cd33d5600e90245fe4fa979d888753b081de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Robert=20Deli=C3=ABn?= Date: Tue, 22 Nov 2011 04:14:22 +0000 Subject: [PATCH] M28: Fix OB1 bug in GPIO driver MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes a small off-by-one bug in the GPIO driver for the mxs platform that allowed the selection gpio pins of one bank more than the SoC actually has. Signed-off-by: Robert Deliën Acked-by: Marek Vasut Acked-by: Marek Vasut --- drivers/gpio/mxs_gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index b7e959128e..539738be9b 100644 --- a/drivers/gpio/mxs_gpio.c +++ b/drivers/gpio/mxs_gpio.c @@ -120,7 +120,7 @@ int gpio_direction_output(int gp, int value) int gpio_request(int gp, const char *label) { - if (PAD_BANK(gp) > PINCTRL_BANKS) + if (PAD_BANK(gp) >= PINCTRL_BANKS) return -EINVAL; return 0; -- 2.39.5