summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2019-01-10 09:22:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-29 12:21:40 +0300
commit40ae643c0790d6e22a10dd7865bc75090b04ff6a (patch)
treec36ede9da68f2ed83939b379f29941929b1aef57 /arch
parent983f90b9ccb944bd12866faf151900679d95f17d (diff)
downloadlinux-40ae643c0790d6e22a10dd7865bc75090b04ff6a.tar.xz
clocksource/drivers/sun5i: Fail gracefully when clock rate is unavailable
[ Upstream commit e7e7e0d7beafebd11b0c065cd5fbc1e5759c5aab ] If the clock tree is not fully populated when the timer-sun5i init code is called, attempts to get the clock rate for the timer would fail and return 0. Make the init code for both clock events and clocksource check the returned clock rate and fail gracefully if the result is 0, instead of causing a divide by 0 exception later on. Fixes: 4a59058f0b09 ("clocksource/drivers/sun5i: Refactor the current code") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions