diff options
author | Frank Rowand <frank.rowand@sony.com> | 2017-06-09 20:26:32 -0400 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2017-06-12 09:00:23 -0400 |
commit | 3db1200ca21f3c63c9044185dc5762ef996848cb (patch) | |
tree | 10abd5bf209dde8eb9342cedd833ea5ab7dadafb /drivers/clocksource/arm_arch_timer.c | |
parent | ff86bf0c65f14346bf2440534f9ba5ac232c39a0 (diff) |
clocksource/drivers/arm_arch_timer: Fix read and iounmap of incorrect 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: c389d701dfb70 ("clocksource: arm_arch_timer: split MMIO timer probing.")
Signed-off-by: Frank Rowand <frank.rowand@sony.com>
Reviewed-by: Fu Wei <fu.wei@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
-rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 4bed671e490e..8b5c30062d99 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c | |||
@@ -1209,9 +1209,9 @@ arch_timer_mem_frame_get_cntfrq(struct arch_timer_mem_frame *frame) | |||
1209 | return 0; | 1209 | return 0; |
1210 | } | 1210 | } |
1211 | 1211 | ||
1212 | rate = readl_relaxed(frame + CNTFRQ); | 1212 | rate = readl_relaxed(base + CNTFRQ); |
1213 | 1213 | ||
1214 | iounmap(frame); | 1214 | iounmap(base); |
1215 | 1215 | ||
1216 | return rate; | 1216 | return rate; |
1217 | } | 1217 | } |