mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 15:19:51 +00:00
ARM: tegra: fix overflow in tegra20_pll_clk_round_rate()
32-bit math isn't enough when e.g. *prate=12000000, and sel->n=1000. Use 64-bit math to prevent this. Cc: Prashant Gaikwad <pgaikwad@nvidia.com> Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
fa67ccb61d
commit
7a74a4436b
@ -789,7 +789,7 @@ static long tegra20_pll_clk_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
struct clk_tegra *c = to_clk_tegra(hw);
|
||||
const struct clk_pll_freq_table *sel;
|
||||
unsigned long input_rate = *prate;
|
||||
unsigned long output_rate = *prate;
|
||||
u64 output_rate = *prate;
|
||||
int mul;
|
||||
int div;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user