]> git.ipfire.org Git - people/ms/u-boot.git/commit
tegra: clock: Avoid a divide-by-zero error
authorSimon Glass <sjg@chromium.org>
Wed, 31 May 2017 23:57:22 +0000 (17:57 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 9 Jun 2017 19:39:33 +0000 (13:39 -0600)
commit1c6c7b6bd8961373a506cf7908e9fe61f6042341
tree0b995b7d280d8c5ff7f27e36cccef94aee03b9e2
parent06cc85a29abfd0f022c51175912adff790aa2434
tegra: clock: Avoid a divide-by-zero error

The clock fix-up for tegra is still present in the code. It causes a
divide-by-zero bug after relocation when chain-loading U-Boot from
coreboot. Fix this by adding a check.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7468676 (ARM: tegra: fix clock_get_periph_rate() for UART clocks)
arch/arm/mach-tegra/clock.c