cpufreq: Fix unsigned variable being checked for negative value
authorjhbird.choi@samsung.com <jhbird.choi@samsung.com>
Mon, 18 Mar 2013 08:09:42 +0000 (08:09 +0000)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 31 Mar 2013 23:11:35 +0000 (01:11 +0200)
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>
drivers/cpufreq/cpufreq-cpu0.c

index 4e5b7fb..6bb88af 100644 (file)
@@ -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;