Skip to content

Commit

Permalink
pinctrl: mvebu: Fix irq_of_parse_and_map() return value
Browse files Browse the repository at this point in the history
[ Upstream commit 71bc7cf ]

The irq_of_parse_and_map() returns 0 on failure, not a negative ERRNO.

Fixes: 2f22760 ("pinctrl: armada-37xx: Add irqchip support")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220422105339.78810-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
krzk authored and gregkh committed Jun 9, 2022
1 parent 8a8b40d commit 84958f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ static int armada_37xx_irqchip_register(struct platform_device *pdev,
for (i = 0; i < nr_irq_parent; i++) {
int irq = irq_of_parse_and_map(np, i);

if (irq < 0)
if (!irq)
continue;
girq->parents[i] = irq;
}
Expand Down

0 comments on commit 84958f0

Please sign in to comment.