Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe13862c authored by Vasyl Gomonovych's avatar Vasyl Gomonovych Committed by Linus Walleij
Browse files

gpio: fix aspeed_gpio_banks array size check



The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().

Signed-off-by: default avatarVasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent bd8ed930
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -149,7 +149,7 @@ static const struct aspeed_gpio_bank *to_bank(unsigned int offset)
{
	unsigned int bank = GPIO_BANK(offset);

	WARN_ON(bank > ARRAY_SIZE(aspeed_gpio_banks));
	WARN_ON(bank >= ARRAY_SIZE(aspeed_gpio_banks));
	return &aspeed_gpio_banks[bank];
}