From: Boris BREZILLON Date: Thu, 18 Dec 2014 20:05:30 +0000 (+0100) Subject: pwm: atmel-hlcdc: Prevent division by zero X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~47^2~7 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df6922adec987b1c7f07870a00f899fbc9a7d4cc;p=pandora-kernel.git 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 Signed-off-by: Thierry Reding --- Reading git-diff-tree failed