]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/cpufreq/exynos-cpufreq.c
Merge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
[karo-tx-linux.git] / drivers / cpufreq / exynos-cpufreq.c
index 475b4f607f0d10c469e3f2352625d3273ade0376..0d32f02ef4d644e5ec915b9205fd5fdf929b30b0 100644 (file)
@@ -113,7 +113,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
                if (ret) {
                        pr_err("%s: failed to set cpu voltage to %d\n",
                                __func__, arm_volt);
-                       goto out;
+                       freqs.new = freqs.old;
+                       goto post_notify;
                }
        }
 
@@ -123,14 +124,19 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
                if (ret) {
                        pr_err("%s: failed to set cpu voltage to %d\n",
                                __func__, safe_arm_volt);
-                       goto out;
+                       freqs.new = freqs.old;
+                       goto post_notify;
                }
        }
 
        exynos_info->set_freq(old_index, index);
 
+post_notify:
        cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
 
+       if (ret)
+               goto out;
+
        /* When the new frequency is lower than current frequency */
        if ((freqs.new < freqs.old) ||
           ((freqs.new > freqs.old) && safe_arm_volt)) {