mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value
@ 2022-04-22 10:41 Krzysztof Kozlowski
  2022-04-22 16:22 ` Neil Armstrong
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-04-22 10:41 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Neil Armstrong, linux-kernel,
	linux-arm-kernel, linux-oxnas
  Cc: Krzysztof Kozlowski

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

Fixes: 89355274e1f7 ("clocksource/drivers/oxnas-rps: Add Oxford Semiconductor RPS Dual Timer")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/clocksource/timer-oxnas-rps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/timer-oxnas-rps.c b/drivers/clocksource/timer-oxnas-rps.c
index 56c0cc32d0ac..d514b44e67dd 100644
--- a/drivers/clocksource/timer-oxnas-rps.c
+++ b/drivers/clocksource/timer-oxnas-rps.c
@@ -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;
 	}
-- 
2.32.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-27  8:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-22 10:41 [PATCH] clocksource/drivers/oxnas-rps: Fix irq_of_parse_and_map() return value Krzysztof Kozlowski
2022-04-22 16:22 ` Neil Armstrong
2022-05-20 14:52 ` Krzysztof Kozlowski
2022-05-20 15:24   ` Daniel Lezcano
2022-05-27  8:35 ` [tip: timers/core] " tip-bot2 for Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®