]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
cpufreq: SPEAr: Fix incorrect variable type
authorSachin Kamat <sachin.kamat@linaro.org>
Thu, 26 Sep 2013 05:26:42 +0000 (10:56 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Sep 2013 18:05:43 +0000 (20:05 +0200)
'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>
drivers/cpufreq/spear-cpufreq.c

index 19e364fa59559cd6bf3e0ec77d9e5bb7c391aafa..3f418166ce02b8fc57a664f3d870bfb8508f3018 100644 (file)
@@ -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;