Skip to content

Commit

Permalink
irqchip/aspeed-i2c-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: f48e699 ("irqchip/aspeed-i2c-ic: Add I2C IRQ controller for Aspeed")
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-1-krzysztof.kozlowski@linaro.org
  • Loading branch information
Krzysztof Kozlowski authored and Marc Zyngier committed May 4, 2022
1 parent 1b2eb89 commit 50f0f26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/irqchip/irq-aspeed-i2c-ic.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ static int __init aspeed_i2c_ic_of_init(struct device_node *node,
}

i2c_ic->parent_irq = irq_of_parse_and_map(node, 0);
if (i2c_ic->parent_irq < 0) {
ret = i2c_ic->parent_irq;
if (!i2c_ic->parent_irq) {
ret = -EINVAL;
goto err_iounmap;
}

Expand Down

0 comments on commit 50f0f26

Please sign in to comment.