Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pwm: atmel-hlcdc: Prevent division by zero
The slow and system clock should never return a rate of zero, but this might happen if the clocks property defined in the DT is referencing the wrong clocks. Prevent any division by zero from happening by testing the clk_freq value before calling do_div(). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
- Loading branch information