projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bd8ed93
)
gpio: fix aspeed_gpio_banks array size check
author
Vasyl Gomonovych
<gomonovych@gmail.com>
Thu, 21 Dec 2017 15:55:10 +0000
(16:55 +0100)
committer
Linus Walleij
<linus.walleij@linaro.org>
Thu, 28 Dec 2017 12:53:06 +0000
(13:53 +0100)
The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-aspeed.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-aspeed.c
b/drivers/gpio/gpio-aspeed.c
index 30bc97b81bec2d516215f8725292f62f162835ff..77e485557498329193fd291194cc037de55c8160 100644
(file)
--- a/
drivers/gpio/gpio-aspeed.c
+++ b/
drivers/gpio/gpio-aspeed.c
@@
-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];
}