From: jhbird.choi@samsung.com Date: Mon, 18 Mar 2013 08:09:42 +0000 (+0000) Subject: cpufreq: Fix unsigned variable being checked for negative value X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5df6055939f295d723871d9781e73495b131b3d6;p=linux-beck.git 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 Acked-by: Shawn Guo Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki --- 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, { 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;