Kaynağa Gözat

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 <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>
jhbird.choi@samsung.com 12 yıl önce
ebeveyn
işleme
5df6055939
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      drivers/cpufreq/cpufreq-cpu0.c

+ 2 - 1
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;