cpufreq: rockchip: fix scale rate error when resume
authorXiao Feng <xf@rock-chips.com>
Mon, 19 Oct 2015 09:22:03 +0000 (17:22 +0800)
committerXiao Feng <xf@rock-chips.com>
Wed, 21 Oct 2015 06:55:03 +0000 (14:55 +0800)
If the return value is 0, it will change voltage in DVFS and lead to
error when resume. Here it change frequency unsuccessfully in fact, so
it need return -EINVAL.

Change-Id: Ia9eff9f75060fcc79c1b275c19de8740754617de
Signed-off-by: Xiao Feng <xf@rock-chips.com>
drivers/cpufreq/rockchip_big_little.c

index 8919e21e4ca61ec6f70ca9fcf4095c71e339f726..f14f3b1e2fce9cd0f2bd62bf7fa1490d87d20bde 100644 (file)
@@ -246,10 +246,10 @@ static int rockchip_bl_cpufreq_scale_rate_for_dvfs(struct clk *clk,
        cpu = cpumask_first_and(cluster_policy_mask[cur_cluster],
                cpu_online_mask);
        if (cpu >= nr_cpu_ids)
-               return 0;
+               return -EINVAL;
        policy = cpufreq_cpu_get(cpu);
        if (!policy)
-               return 0;
+               return -EINVAL;
 
        freqs.new = rate / 1000;
        freqs.old = clk_get_rate(clk) / 1000;