diff options
Diffstat (limited to 'drivers/cpufreq/exynos-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/exynos-cpufreq.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c index 475b4f607f0d..0d32f02ef4d6 100644 --- a/drivers/cpufreq/exynos-cpufreq.c +++ b/drivers/cpufreq/exynos-cpufreq.c | |||
@@ -113,7 +113,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq) | |||
113 | if (ret) { | 113 | if (ret) { |
114 | pr_err("%s: failed to set cpu voltage to %d\n", | 114 | pr_err("%s: failed to set cpu voltage to %d\n", |
115 | __func__, arm_volt); | 115 | __func__, arm_volt); |
116 | goto out; | 116 | freqs.new = freqs.old; |
117 | goto post_notify; | ||
117 | } | 118 | } |
118 | } | 119 | } |
119 | 120 | ||
@@ -123,14 +124,19 @@ static int exynos_cpufreq_scale(unsigned int target_freq) | |||
123 | if (ret) { | 124 | if (ret) { |
124 | pr_err("%s: failed to set cpu voltage to %d\n", | 125 | pr_err("%s: failed to set cpu voltage to %d\n", |
125 | __func__, safe_arm_volt); | 126 | __func__, safe_arm_volt); |
126 | goto out; | 127 | freqs.new = freqs.old; |
128 | goto post_notify; | ||
127 | } | 129 | } |
128 | } | 130 | } |
129 | 131 | ||
130 | exynos_info->set_freq(old_index, index); | 132 | exynos_info->set_freq(old_index, index); |
131 | 133 | ||
134 | post_notify: | ||
132 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); | 135 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); |
133 | 136 | ||
137 | if (ret) | ||
138 | goto out; | ||
139 | |||
134 | /* When the new frequency is lower than current frequency */ | 140 | /* When the new frequency is lower than current frequency */ |
135 | if ((freqs.new < freqs.old) || | 141 | if ((freqs.new < freqs.old) || |
136 | ((freqs.new > freqs.old) && safe_arm_volt)) { | 142 | ((freqs.new > freqs.old) && safe_arm_volt)) { |