pwm: bcm2835: Prevent division by zero
authorStefan Wahren <stefan.wahren@i2se.com>
Tue, 1 Dec 2015 22:55:40 +0000 (22:55 +0000)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 16 Dec 2015 15:45:10 +0000 (16:45 +0100)
commitfd13c14426299e75983a0cd3edf53dfa4083a70a
tree1698122b905b9bfbaa364b11dc38ad9ac435674b
parentebe88b6ae41ff8f2b48608b6019c4341aa24bcea
pwm: bcm2835: Prevent division by zero

It's possible that the PWM clock becomes an orphan. So better check the
result of clk_get_rate() in order to prevent a division by zero.

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-bcm2835.c