clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Sun, 2 Aug 2020 11:15:41 +0000 (19:15 +0800)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 24 Aug 2020 11:01:38 +0000 (13:01 +0200)
In the init function, if the call to of_iomap() fails, the return
value is ENXIO instead of -ENXIO.

Change to the right negative errno.

Fixes: 691f8f878290f ("clocksource/drivers/h8300_timer8: Convert init function to return error")
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200802111541.5429-1-tianjia.zhang@linux.alibaba.com
drivers/clocksource/h8300_timer8.c

index 1d740a8c42ab32ed9d36dd6d38635d6032a48215..47114c2a7cb5448739c108990cf476403b3f1d4a 100644 (file)
@@ -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");