Commit e804944d authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Linus Walleij
Browse files

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: 3b588e43 ("pinctrl: nuvoton: add NPCM7xx pinctrl and GPIO driver")
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220423094142.33013-2-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a9387099
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;