diff options
author | jhbird.choi@samsung.com <jhbird.choi@samsung.com> | 2013-03-18 04:09:42 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-03-31 19:11:35 -0400 |
commit | 5df6055939f295d723871d9781e73495b131b3d6 (patch) | |
tree | a696a1d4d2fbf8952acf55b17b769df69911e7d1 | |
parent | 27ed3cd2ebf4cd78b198be9758c538cdede36d8a (diff) |
cpufreq: Fix unsigned variable being checked for negative value
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 <jhbird.choi@samsung.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/cpufreq-cpu0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq-cpu0.c b/drivers/cpufreq/cpufreq-cpu0.c index 4e5b7fb8927c..6bb88af6b5d0 100644 --- a/drivers/cpufreq/cpufreq-cpu0.c +++ b/drivers/cpufreq/cpufreq-cpu0.c | |||
@@ -44,7 +44,8 @@ static int cpu0_set_target(struct cpufreq_policy *policy, | |||
44 | { | 44 | { |
45 | struct cpufreq_freqs freqs; | 45 | struct cpufreq_freqs freqs; |
46 | struct opp *opp; | 46 | struct opp *opp; |
47 | unsigned long freq_Hz, volt = 0, volt_old = 0, tol = 0; | 47 | unsigned long volt = 0, volt_old = 0, tol = 0; |
48 | long freq_Hz; | ||
48 | unsigned int index, cpu; | 49 | unsigned int index, cpu; |
49 | int ret; | 50 | int ret; |
50 | 51 | ||