projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45fe0b5
)
gpio: sifive: Fix SiFive gpio probe
author
Damien Le Moal
<damien.lemoal@wdc.com>
Sat, 7 Nov 2020 08:13:57 +0000
(17:13 +0900)
committer
Linus Walleij
<linus.walleij@linaro.org>
Wed, 11 Nov 2020 08:53:09 +0000
(09:53 +0100)
Fix the check on the number of IRQs to allow up to the maximum (32)
instead of only the maximum minus one.
Fixes:
96868dce644d
("gpio/sifive: Add GPIO driver for SiFive SoCs")
Cc: stable@vger.kernel.org
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Link:
https://lore.kernel.org/r/20201107081420.60325-10-damien.lemoal@wdc.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-sifive.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpio/gpio-sifive.c
b/drivers/gpio/gpio-sifive.c
index c54dd08f2cbfd3c75d74ffec723f4e0e5f72e4f7..d5eb9ca119016c6ba7882334ee2eaf16ce77949a 100644
(file)
--- a/
drivers/gpio/gpio-sifive.c
+++ b/
drivers/gpio/gpio-sifive.c
@@
-183,7
+183,7
@@
static int sifive_gpio_probe(struct platform_device *pdev)
return PTR_ERR(chip->regs);
ngpio = of_irq_count(node);
- if (ngpio >
=
SIFIVE_GPIO_MAX) {
+ if (ngpio > SIFIVE_GPIO_MAX) {
dev_err(dev, "Too many GPIO interrupts (max=%d)\n",
SIFIVE_GPIO_MAX);
return -ENXIO;