Commit 400d033f authored by Tianjia Zhang's avatar Tianjia Zhang Committed by Daniel Lezcano
Browse files

clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()



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: 691f8f87 ("clocksource/drivers/h8300_timer8: Convert init function to return error")
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarTianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200802111541.5429-1-tianjia.zhang@linux.alibaba.com
parent b0294f30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");