aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-davinci/cpufreq.c')
-rw-r--r--arch/arm/mach-davinci/cpufreq.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/arm/mach-davinci/cpufreq.c b/arch/arm/mach-davinci/cpufreq.c
index d3fa6de1e20f..bc8014279114 100644
--- a/arch/arm/mach-davinci/cpufreq.c
+++ b/arch/arm/mach-davinci/cpufreq.c
@@ -104,15 +104,21 @@ static int davinci_target(struct cpufreq_policy *policy,
104 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); 104 cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
105 105
106 /* if moving to higher frequency, up the voltage beforehand */ 106 /* if moving to higher frequency, up the voltage beforehand */
107 if (pdata->set_voltage && freqs.new > freqs.old) 107 if (pdata->set_voltage && freqs.new > freqs.old) {
108 pdata->set_voltage(idx); 108 ret = pdata->set_voltage(idx);
109 if (ret)
110 goto out;
111 }
109 112
110 ret = clk_set_rate(armclk, idx); 113 ret = clk_set_rate(armclk, idx);
114 if (ret)
115 goto out;
111 116
112 /* if moving to lower freq, lower the voltage after lowering freq */ 117 /* if moving to lower freq, lower the voltage after lowering freq */
113 if (pdata->set_voltage && freqs.new < freqs.old) 118 if (pdata->set_voltage && freqs.new < freqs.old)
114 pdata->set_voltage(idx); 119 pdata->set_voltage(idx);
115 120
121out:
116 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); 122 cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
117 123
118 return ret; 124 return ret;