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
[ Upstream commit f03a9670d27d23fe734a456f16e2579b21ec02b4 ]

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]
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
krzk authored and gregkh committed Jun 9, 2022
1 parent f4b503b commit 0d5c8ac
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 @@ -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;
}

Expand Down

0 comments on commit 0d5c8ac

Please sign in to comment.