projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f40f730
)
gpio: ep93xx: fix test for end of loop
author
Dan Carpenter
<dan.carpenter@oracle.com>
Thu, 6 Sep 2018 13:33:48 +0000
(16:33 +0300)
committer
Linus Walleij
<linus.walleij@linaro.org>
Mon, 10 Sep 2018 06:48:24 +0000
(08:48 +0200)
The problem is that if port == ARRAY_SIZE() and "gc == &epg->gc[port]"
then that should be treated as invalid.
Fixes:
fd935fc421e7
("gpio: ep93xx: Do not pingpong irq numbers")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ep93xx.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-ep93xx.c
b/drivers/gpio/gpio-ep93xx.c
index
dd22ea1
..
71728d6
100644
(file)
--- a/
drivers/gpio/gpio-ep93xx.c
+++ b/
drivers/gpio/gpio-ep93xx.c
@@
-80,7
+80,7
@@
static int ep93xx_gpio_port(struct gpio_chip *gc)
port++;
/* This should not happen but is there as a last safeguard */
- if (
gc != &epg->gc[port]
) {
+ if (
port == ARRAY_SIZE(epg->gc)
) {
pr_crit("can't find the GPIO port\n");
return 0;
}