]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
clocksource/drivers/timer-of: Fix invalid iomap check
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Tue, 20 Jun 2017 05:51:11 +0000 (07:51 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 26 Jun 2017 16:32:04 +0000 (18:32 +0200)
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>
drivers/clocksource/timer-of.c

index 64b1c2081a676110fdafc9f9ce2f72a29792417c..f6e7491c873cd8767b92c0ba0e1222052e1bdc4c 100644 (file)
@@ -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;
        }