Skip to content

Commit

Permalink
clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect…
Browse files Browse the repository at this point in the history
… variable

Fix boot warning 'Trying to vfree() nonexistent vm area'
from arch_timer_mem_of_init().

Refactored code attempts to read and iounmap using address frame
instead of address ioremap(frame->cntbase).

Fixes: c389d70 ("clocksource: arm_arch_timer: split MMIO timer probing.")

Signed-off-by: Frank Rowand <[email protected]>
Reviewed-by: Fu Wei <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
  • Loading branch information
frowand authored and dlezcano committed Jun 12, 2017
1 parent ff86bf0 commit 3db1200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clocksource/arm_arch_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,9 +1209,9 @@ arch_timer_mem_frame_get_cntfrq(struct arch_timer_mem_frame *frame)
return 0;
}

rate = readl_relaxed(frame + CNTFRQ);
rate = readl_relaxed(base + CNTFRQ);

iounmap(frame);
iounmap(base);

return rate;
}
Expand Down

0 comments on commit 3db1200

Please sign in to comment.