diff options
author | Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | 2020-08-02 19:15:41 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-10-01 13:14:51 +0200 |
commit | 907a6ee8b0e5691abefcc599b27ca7edee00600a (patch) | |
tree | 40b2faf1fa8f79c975c3f9d058570b42b61feef9 /drivers/clocksource | |
parent | 0ad77d7dc50113065d218c5d951a79fc37cd6a79 (diff) | |
download | linux-stable-907a6ee8b0e5691abefcc599b27ca7edee00600a.tar.gz linux-stable-907a6ee8b0e5691abefcc599b27ca7edee00600a.tar.bz2 linux-stable-907a6ee8b0e5691abefcc599b27ca7edee00600a.zip |
clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()
[ Upstream commit 400d033f5a599120089b5f0c54d14d198499af5a ]
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
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r-- | drivers/clocksource/h8300_timer8.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |