[irqchip: irq/irqchip-next] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
From: irqchip-bot for Krzysztof Kozlowski
Date: Wed May 04 2022 - 12:16:01 EST
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: f03a9670d27d23fe734a456f16e2579b21ec02b4
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/f03a9670d27d23fe734a456f16e2579b21ec02b4
Author: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
AuthorDate: Sat, 23 Apr 2022 11:42:27 +02:00
Committer: Marc Zyngier <maz@xxxxxxxxxx>
CommitterDate: Wed, 04 May 2022 16:37:48 +01:00
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@xxxxxxxxxx>
Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20220423094227.33148-2-krzysztof.kozlowski@xxxxxxxxxx
---
drivers/irqchip/irq-aspeed-scu-ic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 18b77c3..279e92c 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;
}