diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2022-04-23 11:42:27 +0200 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2022-05-04 17:37:48 +0200 |
commit | f03a9670d27d23fe734a456f16e2579b21ec02b4 (patch) | |
tree | c8d838edaa90a02eac6a395e1ec995a14112a13a /drivers/irqchip/irq-aspeed-scu-ic.c | |
parent | irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value (diff) | |
download | linux-f03a9670d27d23fe734a456f16e2579b21ec02b4.tar.xz linux-f03a9670d27d23fe734a456f16e2579b21ec02b4.zip |
irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
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
Diffstat (limited to 'drivers/irqchip/irq-aspeed-scu-ic.c')
-rw-r--r-- | drivers/irqchip/irq-aspeed-scu-ic.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c index 18b77c3e6db4..279e92cf0b16 100644 --- a/drivers/irqchip/irq-aspeed-scu-ic.c +++ b/drivers/irqchip/irq-aspeed-scu-ic.c @@ -157,8 +157,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; } |