Skip to content

Commit

Permalink
irqchip/aspeed-scu-ic: Fix irq_of_parse_and_map() return value
Browse files Browse the repository at this point in the history
The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 04f6059 ("irqchip: Add Aspeed SCU interrupt controller")
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
krzk authored and Marc Zyngier committed May 4, 2022
1 parent 50f0f26 commit f03a967
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-aspeed-scu-ic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f03a967

Please sign in to comment.