[Uclinux-h8-devel] [PATCH] clocksource/h8300_timer8: Fix wrong return value in h8300_8timer_init()

Back to archive index
Tianjia Zhang tianj****@linux*****
2020年 8月 2日 (日) 20:15:41 JST


In the case of calling of_iomap() failed, a positive value ENXIO is
returned here. I think this is a typo error. It is necessary to return
a negative error value.

Fixes: 691f8f878290f ("clocksource/drivers/h8300_timer8: Convert init function to return error")
Cc: Daniel Lezcano <danie****@linar*****>
Signed-off-by: Tianjia Zhang <tianj****@linux*****>
---
 drivers/clocksource/h8300_timer8.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clocksource/h8300_timer8.c b/drivers/clocksource/h8300_timer8.c
index 1d740a8c42ab..47114c2a7cb5 100644
--- a/drivers/clocksource/h8300_timer8.c
+++ b/drivers/clocksource/h8300_timer8.c
@@ -169,7 +169,7 @@ static int __init h8300_8timer_init(struct device_node *node)
 		return PTR_ERR(clk);
 	}
 
-	ret = ENXIO;
+	ret = -ENXIO;
 	base = of_iomap(node, 0);
 	if (!base) {
 		pr_err("failed to map registers for clockevent\n");
-- 
2.26.2



Uclinux-h8-devel メーリングリストの案内
Back to archive index