diff options
author | Marek Vasut <[email protected]> | 2017-07-09 15:28:07 +0200 |
---|---|---|
committer | Stephen Boyd <[email protected]> | 2017-07-17 11:50:59 -0700 |
commit | 3bded569cab4d839a47fcbd83e4e8926ae6ddad5 (patch) | |
tree | 30fe34d02cc70aa9322fe89c1a79cabba01a0916 /tools/perf/scripts/python/syscall-counts-by-pid.py | |
parent | 6d7489c74a6ed73b4751b58b56c247bedd780a78 (diff) |
clk: vc5: Prevent division by zero on unconfigured outputs
In case the initial values of the FOD registers are not configured in
the OTP or by the bootloader, it is possible that the FOD registers
will contain zeroes. The code in vc5_fod_recalc_rate() immediately
feeds the FOD divider value obtained from the FOD registers into the
div64_u64() and if the FOD divider value is zero, triggers division
by zero exception.
Check if the FOD divider value is zero and return the frequency of
the FOD output as 0 Hz if it is so. This prevents the division by
zero exception.
Signed-off-by: Marek Vasut <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Alexey Firago <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: [email protected]
Tested-by: Laurent Pinchart <[email protected]> # Salvator-XS with the display LVDS output.
Signed-off-by: Stephen Boyd <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions