pinctrl: mvebu: Fix irq_of_parse_and_map() return value
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fri, 22 Apr 2022 10:53:38 +0000 (12:53 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 28 Apr 2022 22:49:11 +0000 (00:49 +0200)
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 2f227605394b ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220422105339.78810-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mvebu/pinctrl-armada-37xx.c

index 08cad14..adccf03 100644 (file)
@@ -773,7 +773,7 @@ static int armada_37xx_irqchip_register(struct platform_device *pdev,
        for (i = 0; i < nr_irq_parent; i++) {
                int irq = irq_of_parse_and_map(np, i);
 
-               if (irq < 0)
+               if (!irq)
                        continue;
                girq->parents[i] = irq;
        }