diff options
-rw-r--r-- | drivers/clk/shmobile/clk-div6.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/shmobile/clk-div6.c b/drivers/clk/shmobile/clk-div6.c index efbaf6c81b75..036a692c7219 100644 --- a/drivers/clk/shmobile/clk-div6.c +++ b/drivers/clk/shmobile/clk-div6.c | |||
@@ -90,6 +90,9 @@ static unsigned int cpg_div6_clock_calc_div(unsigned long rate, | |||
90 | { | 90 | { |
91 | unsigned int div; | 91 | unsigned int div; |
92 | 92 | ||
93 | if (!rate) | ||
94 | rate = 1; | ||
95 | |||
93 | div = DIV_ROUND_CLOSEST(parent_rate, rate); | 96 | div = DIV_ROUND_CLOSEST(parent_rate, rate); |
94 | return clamp_t(unsigned int, div, 1, 64); | 97 | return clamp_t(unsigned int, div, 1, 64); |
95 | } | 98 | } |