Skip to content

Commit

Permalink
ARM: tegra30: clk: Fix output_rate overflow
Browse files Browse the repository at this point in the history
Change the type of variable from "unsigned long" to "u64".
This avoids the overflow while clock rate calculating.

Signed-off-by: Mark Zhang <markz@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
  • Loading branch information
Mark Zhang authored and Stephen Warren committed Oct 16, 2012
1 parent ddffeb8 commit 7866213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-tegra/tegra30_clocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ static long tegra30_pll_round_rate(struct clk_hw *hw, unsigned long rate,
{
struct clk_tegra *c = to_clk_tegra(hw);
unsigned long input_rate = *prate;
unsigned long output_rate = *prate;
u64 output_rate = *prate;
const struct clk_pll_freq_table *sel;
struct clk_pll_freq_table cfg;
int mul;
Expand Down

0 comments on commit 7866213

Please sign in to comment.