diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-23 11:41:42 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-05-04 23:48:40 +0200 |
commit | e804944dcc77991e6b5d81ee9b422297b2998d1d (patch) | |
tree | 7ad50e06637e6e798a80831bc02f088ddc17400e /drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | |
parent | a9387099d8a14cc9eaf6db15db1aa37bcfc3ac2d (diff) |
pinctrl: nuvoton: Fix irq_of_parse_and_map() return value
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.
Fixes: 3b588e43ee5c ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220423094142.33013-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c')
-rw-r--r-- | drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c index 3cf0f8a43c37..cc085ba2d7e4 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; |