summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c')
-rw-r--r--drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 4828aa25e5c9..64d8a568b3db 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -1898,9 +1898,9 @@ static int npcm7xx_gpio_of(struct npcm7xx_pinctrl *pctrl)
}
ret = irq_of_parse_and_map(np, 0);
- if (ret < 0) {
+ if (!ret) {
dev_err(dev, "No IRQ for GPIO bank %u\n", id);
- return ret;
+ return -EINVAL;
}
pctrl->gpio_bank[id].irq = ret;
pctrl->gpio_bank[id].irq_chip = npcmgpio_irqchip;