Skip to content

Commit

Permalink
cpufreq: Fix unsigned variable being checked for negative value
Browse files Browse the repository at this point in the history
clk_round_rate() returns singed value which was assigned to an unsigned
variable.
So it can't be checked for negative.

Signed-off-by: Jonghwan Choi <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Acked-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
[email protected] authored and rafaeljw committed Mar 31, 2013
1 parent 27ed3cd commit 5df6055
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/cpufreq/cpufreq-cpu0.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ static int cpu0_set_target(struct cpufreq_policy *policy,
{
struct cpufreq_freqs freqs;
struct opp *opp;
unsigned long freq_Hz, volt = 0, volt_old = 0, tol = 0;
unsigned long volt = 0, volt_old = 0, tol = 0;
long freq_Hz;
unsigned int index, cpu;
int ret;

Expand Down

0 comments on commit 5df6055

Please sign in to comment.