diff options
author | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-06-20 08:51:11 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-06-26 19:32:04 +0300 |
commit | 22ece4e3df6335e691207de1198a609e761b8640 (patch) | |
tree | f5fd74578f3ab5f4b573d37e4fe1474d1acbc4f6 /drivers/clocksource/timer-of.c | |
parent | 9902747ec57d11b27c98e53d66112ecceed43c82 (diff) | |
download | linux-22ece4e3df6335e691207de1198a609e761b8640.tar.xz |
clocksource/drivers/timer-of: Fix invalid iomap check
A typo in the code checks the return value of iomap against !NULL
and, thus, fails everytime the mapping succeed.
Fix this by inverting the condition in the check.
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/timer-of.c')
-rw-r--r-- | drivers/clocksource/timer-of.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index 64b1c2081a67..f6e7491c873c 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -120,7 +120,7 @@ static __init int timer_base_init(struct device_node *np, const char *name = of_base->name ? of_base->name : np->full_name; of_base->base = of_io_request_and_map(np, of_base->index, name); - if (of_base->base) { + if (!of_base->base) { pr_err("Failed to iomap (%s)\n", name); return -ENXIO; } |