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:
175ca83
)
pinctrl: coh901: Fix error checking in u300_gpio_to_irq
author
Axel Lin
<
[email protected]
>
Thu, 28 Mar 2013 16:18:12 +0000
(
00:18
+0800)
committer
Linus Walleij
<
[email protected]
>
Wed, 3 Apr 2013 12:31:19 +0000
(14:31 +0200)
The pointer "port" is always not NULL if gpio->port_list is not empty.
Signed-off-by: Axel Lin <
[email protected]
>
Signed-off-by: Linus Walleij <
[email protected]
>
drivers/pinctrl/pinctrl-coh901.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/pinctrl-coh901.c
b/drivers/pinctrl/pinctrl-coh901.c
index 86887850ac13431b296bd8d09d83e5be68ffc6a5..edde3acc41864b5d9770be7696e553558d428902 100644
(file)
--- a/
drivers/pinctrl/pinctrl-coh901.c
+++ b/
drivers/pinctrl/pinctrl-coh901.c
@@
-318,13
+318,16
@@
static int u300_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
struct u300_gpio_port *port = NULL;
struct list_head *p;
int retirq;
+ bool found = false;
list_for_each(p, &gpio->port_list) {
port = list_entry(p, struct u300_gpio_port, node);
- if (port->number == portno)
+ if (port->number == portno) {
+ found = true;
break;
+ }
}
- if (
port == NULL
) {
+ if (
!found
) {
dev_err(gpio->dev, "could not locate port for GPIO %d IRQ\n",
offset);
return -EINVAL;