summaryrefslogtreecommitdiffstats
path: root/drivers/clk/spear/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/spear/clk.c')
-rw-r--r--drivers/clk/spear/clk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clk/spear/clk.c b/drivers/clk/spear/clk.c
index 7cd63788d546..628b6d5ed3d9 100644
--- a/drivers/clk/spear/clk.c
+++ b/drivers/clk/spear/clk.c
@@ -32,5 +32,8 @@ long clk_round_rate_index(struct clk_hw *hw, unsigned long drate,
}
}
+ if ((*index) == rtbl_cnt)
+ (*index)--;
+
return rate;
}