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 <robert at delien.nl>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
int gpio_request(int gp, const char *label)
{
int gpio_request(int gp, const char *label)
{
- if (PAD_BANK(gp) > PINCTRL_BANKS)
+ if (PAD_BANK(gp) >= PINCTRL_BANKS)
return -EINVAL;
return 0;
return -EINVAL;
return 0;