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 f03a967 ]

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 <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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • 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.