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:
1b43d26
)
gpio: ftgpio010: Fix platform_get_irq's error checking
author
Arvind Yadav
<arvind.yadav.cs@gmail.com>
Sat, 2 Dec 2017 17:01:01 +0000
(22:31 +0530)
committer
Linus Walleij
<linus.walleij@linaro.org>
Sat, 2 Dec 2017 21:42:35 +0000
(22:42 +0100)
The platform_get_irq() function returns negative if an error occurs.
zero or positive number on success. platform_get_irq() error checking
for zero is not correct.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ftgpio010.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-ftgpio010.c
b/drivers/gpio/gpio-ftgpio010.c
index 7b3394fdc624d17d24628f8a184dd6386b86ad87..b7a3a2db699b76c6abb2df04a6e28e23b3875d88 100644
(file)
--- a/
drivers/gpio/gpio-ftgpio010.c
+++ b/
drivers/gpio/gpio-ftgpio010.c
@@
-176,8
+176,8
@@
static int ftgpio_gpio_probe(struct platform_device *pdev)
return PTR_ERR(g->base);
irq = platform_get_irq(pdev, 0);
- if (
!irq
)
- return -EINVAL;
+ if (
irq <= 0
)
+ return
irq ? irq :
-EINVAL;
ret = bgpio_init(&g->gc, dev, 4,
g->base + GPIO_DATA_IN,