projects
/
wrapfs-3.2.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bc9179
)
pinctrl: pistachio: fix use of irq_of_parse_and_map()
author
Lv Ruyi
<lv.ruyi@zte.com.cn>
Sun, 24 Apr 2022 03:14:30 +0000
(
03:14
+0000)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 12 May 2022 10:20:21 +0000
(12:20 +0200)
[ Upstream commit
0c9843a74a85224a89daa81fa66891dae2f930e1
]
The irq_of_parse_and_map() function returns 0 on failure, and does not
return an negative value.
Fixes: cefc03e5995e ("pinctrl: Add Pistachio SoC pin control driver")
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link:
https://lore.kernel.org/r/20220424031430.3170759-1-lv.ruyi@zte.com.cn
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/pinctrl-pistachio.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/pinctrl-pistachio.c
b/drivers/pinctrl/pinctrl-pistachio.c
index 0d7d379e9bb80e76536946ab19438e2f0e85e230..fb7340ad15b3bc34a2e5c153b167c0ca2800a42f 100644
(file)
--- a/
drivers/pinctrl/pinctrl-pistachio.c
+++ b/
drivers/pinctrl/pinctrl-pistachio.c
@@
-1374,10
+1374,10
@@
static int pistachio_gpio_register(struct pistachio_pinctrl *pctl)
}
irq = irq_of_parse_and_map(child, 0);
- if (
irq < 0
) {
- dev_err(pctl->dev, "No IRQ for bank %u
: %d\n", i, irq
);
+ if (
!irq
) {
+ dev_err(pctl->dev, "No IRQ for bank %u
\n", i
);
of_node_put(child);
- ret =
irq
;
+ ret =
-EINVAL
;
goto err;
}