]> git.dujemihanovic.xyz Git - u-boot.git/commit
dm: timer: refuse timers with zero clock_rate
authorStephen Warren <swarren@nvidia.com>
Wed, 6 Jan 2016 17:33:03 +0000 (10:33 -0700)
committerSimon Glass <sjg@chromium.org>
Thu, 21 Jan 2016 02:06:23 +0000 (19:06 -0700)
commit0a7edce0ef26d9a8c11e9c097e0ed12cf334e27d
tree12aa4e174c947f098a7c508b5137d2cfb1904018
parentcf2045283284a3226889b66541c456eb7ca869e9
dm: timer: refuse timers with zero clock_rate

If a timer has a zero clock_rate, get_tbclk() will return zero for it,
which will cause tick_to_time() to perform a division-by-zero, which will
crash U-Boot.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/timer/timer-uclass.c