]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Sat, 23 Apr 2022 09:42:27 +0000 (11:42 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:21:05 +0000 (10:21 +0200)
[ Upstream commit f03a9670d27d23fe734a456f16e2579b21ec02b4 ]

The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 04f605906ff0 ("irqchip: Add Aspeed SCU interrupt controller")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220423094227.33148-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-aspeed-scu-ic.c

index 0f0aac7cc1140763f9b1c9289e87b3aaa7dc8b6f..7cb13364ecfa117b2a2a6114169fe7041bc3d88c 100644 (file)
@@ -159,8 +159,8 @@ static int aspeed_scu_ic_of_init_common(struct aspeed_scu_ic *scu_ic,
        }
 
        irq = irq_of_parse_and_map(node, 0);
-       if (irq < 0) {
-               rc = irq;
+       if (!irq) {
+               rc = -EINVAL;
                goto err;
        }