From: Robert Deliën Date: Tue, 22 Nov 2011 04:14:22 +0000 (+0000) Subject: M28: Fix OB1 bug in GPIO driver X-Git-Tag: v2011.12-rc1~60^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5a42cd33d5600e90245fe4fa979d888753b081de;p=platform%2Fkernel%2Fu-boot.git M28: Fix OB1 bug in GPIO driver 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 --- diff --git a/drivers/gpio/mxs_gpio.c b/drivers/gpio/mxs_gpio.c index b7e9591..539738b 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;