提交 9a7c52bf 编写于 作者: K Krzysztof Kozlowski 提交者: Zheng Zengkai

clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value

stable inclusion
from stable-v5.10.122
commit e892a7e60f1f508262c0fe6c84f2486c69594745
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5W6OE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e892a7e60f1f508262c0fe6c84f2486c69594745

--------------------------------

[ Upstream commit 9c04a8ff ]

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

Fixes: 89355274 ("clocksource/drivers/oxnas-rps: Add Oxford Semiconductor RPS Dual Timer")
Signed-off-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: NNeil Armstrong <narmstrong@baylibre.com>
Link: https://lore.kernel.org/r/20220422104101.55754-1-krzysztof.kozlowski@linaro.orgSigned-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
上级 bbb5089b
...@@ -236,7 +236,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np) ...@@ -236,7 +236,7 @@ static int __init oxnas_rps_timer_init(struct device_node *np)
} }
rps->irq = irq_of_parse_and_map(np, 0); rps->irq = irq_of_parse_and_map(np, 0);
if (rps->irq < 0) { if (!rps->irq) {
ret = -EINVAL; ret = -EINVAL;
goto err_iomap; goto err_iomap;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册