]> git.karo-electronics.de Git - linux-beck.git/commitdiff
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 4e5b7fb8927cb5304e3baf37dc3ccb87e71c31b9..6bb88af6b5d07afe6fce91e64b5af40cd798245e 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;