Commit 3db1200c authored by Frank Rowand's avatar Frank Rowand Committed by Daniel Lezcano

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: c389d701 ("clocksource: arm_arch_timer: split MMIO timer probing.")
Signed-off-by: default avatarFrank Rowand <frank.rowand@sony.com>
Reviewed-by: default avatarFu Wei <fu.wei@linaro.org>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent ff86bf0c
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment