Skip to content

Commit

Permalink
clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
Browse files Browse the repository at this point in the history
[ Upstream commit 9c04a8f ]

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

Fixes: 8935527 ("clocksource/drivers/oxnas-rps: Add Oxford Semiconductor RPS Dual Timer")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220422104101.55754-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
krzk authored and gregkh committed Jun 14, 2022
1 parent 1d73616 commit e892a7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-oxnas-rps.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
}

rps->irq = irq_of_parse_and_map(np, 0);
if (rps->irq < 0) {
if (!rps->irq) {
ret = -EINVAL;
goto err_iomap;
}
Expand Down

0 comments on commit e892a7e

Please sign in to comment.