提交 fe13862c 编写于 作者: V Vasyl Gomonovych 提交者: Linus Walleij

gpio: fix aspeed_gpio_banks array size check

The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
Signed-off-by: NVasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 bd8ed930
......@@ -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];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册