projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53e41f5
)
gpio: grgpio: off by one in grgpio_to_irq()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Tue, 16 Dec 2014 23:53:59 +0000
(
02:53
+0300)
committer
Linus Walleij
<linus.walleij@linaro.org>
Thu, 15 Jan 2015 16:23:19 +0000
(17:23 +0100)
"gc->ngpio" is a number between 1 and GRGPIO_MAX_NGPIO. If "offset" is
GRGPIO_MAX_NGPIO then we're going one step beyond the end of the
priv->lirqs[] array.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-grgpio.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpio/gpio-grgpio.c
b/drivers/gpio/gpio-grgpio.c
index 09daaf2aeb563d982c71807b8155df4b2c50a6c5..d5bc70fce4df6eb0dd0c1a5e142c8da9482feff0 100644
(file)
--- a/
drivers/gpio/gpio-grgpio.c
+++ b/
drivers/gpio/gpio-grgpio.c
@@
-121,7
+121,7
@@
static int grgpio_to_irq(struct gpio_chip *gc, unsigned offset)
{
struct grgpio_priv *priv = grgpio_gc_to_priv(gc);
- if (offset > gc->ngpio)
+ if (offset >
=
gc->ngpio)
return -ENXIO;
if (priv->lirqs[offset].index < 0)