diff mbox series

[2/2] irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value

Message ID 20220422104536.61451-2-krzysztof.kozlowski@linaro.org
State Accepted
Commit f03a9670d27d23fe734a456f16e2579b21ec02b4
Headers show
Series [1/2] irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value | expand

Commit Message

Krzysztof Kozlowski April 22, 2022, 10:45 a.m. UTC
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>
---
 drivers/irqchip/irq-aspeed-scu-ic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/irqchip/irq-aspeed-scu-ic.c b/drivers/irqchip/irq-aspeed-scu-ic.c
index 18b77c3e6db4..9cf67541828f 100644
--- a/drivers/irqchip/irq-aspeed-scu-ic.c
+++ b/drivers/irqchip/irq-aspeed-scu-ic.c
@@ -157,7 +157,7 @@  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) {
+	if (!irq) {
 		rc = irq;
 		goto err;
 	}