Skip to content

Commit

Permalink
clocksource/drivers/timer-of: Fix invalid iomap check
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
dlezcano committed Jun 26, 2017
1 parent 9902747 commit 22ece4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clocksource/timer-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 22ece4e

Please sign in to comment.