Browse Source

cpufreq: SPEAr: Fix incorrect variable type

'clk_round_rate' returns a negative error code upon failure. This
will never get detected by unsigned 'newfreq'. Make it signed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Sachin Kamat 11 years ago
parent
commit
bb25f13aed
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/cpufreq/spear-cpufreq.c

+ 1 - 1
drivers/cpufreq/spear-cpufreq.c

@@ -113,7 +113,7 @@ static int spear_cpufreq_target(struct cpufreq_policy *policy,
 		unsigned int target_freq, unsigned int relation)
 {
 	struct cpufreq_freqs freqs;
-	unsigned long newfreq;
+	long newfreq;
 	struct clk *srcclk;
 	int index, ret, mult = 1;