summaryrefslogtreecommitdiff
path: root/drivers/clk/mediatek/clk-pll.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/mediatek/clk-pll.c')
-rw-r--r--drivers/clk/mediatek/clk-pll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/mediatek/clk-pll.c b/drivers/clk/mediatek/clk-pll.c
index 68af5183cda0..0e3f4ef0e871 100644
--- a/drivers/clk/mediatek/clk-pll.c
+++ b/drivers/clk/mediatek/clk-pll.c
@@ -144,9 +144,9 @@ static void mtk_pll_calc_values(struct mtk_clk_pll *pll, u32 *pcw, u32 *postdiv,
if (freq > pll->data->fmax)
freq = pll->data->fmax;
- for (val = 0; val < 4; val++) {
+ for (val = 0; val < 5; val++) {
*postdiv = 1 << val;
- if (freq * *postdiv >= fmin)
+ if ((u64)freq * *postdiv >= fmin)
break;
}