From 5df6055939f295d723871d9781e73495b131b3d6 Mon Sep 17 00:00:00 2001 From: "jhbird.choi@samsung.com" Date: Mon, 18 Mar 2013 08:09:42 +0000 Subject: [PATCH] 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 --- drivers/cpufreq/cpufreq-cpu0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5