From 625813c9bd00906b21f7c45a246bc3f5ce0e8313 Mon Sep 17 00:00:00 2001 From: Xiao Feng Date: Mon, 19 Oct 2015 17:22:03 +0800 Subject: [PATCH] cpufreq: rockchip: fix scale rate error when resume 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 --- drivers/cpufreq/rockchip_big_little.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/rockchip_big_little.c b/drivers/cpufreq/rockchip_big_little.c index 8919e21e4ca6..f14f3b1e2fce 100644 --- a/drivers/cpufreq/rockchip_big_little.c +++ b/drivers/cpufreq/rockchip_big_little.c @@ -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; -- 2.34.1