summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-06-19 14:22:59 +0530
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-06-24 13:19:27 +0200
commit567f4f6727bccf729fb2c55c9da29c787bb1b583 (patch)
tree98429b591257f491380d7c4b57088af5b9b47342 /drivers/cpufreq
parente15d8309e961ea960dbe40f94fd7ac64f8efe3f6 (diff)
cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
In case we have started PRECHANGE notifier and found an error, we must call POSTCHANGE notifier with freqs.new = freqs.old. This driver does take care of it, but the POSTCHANGE is called with freqs.new on errors too, which is incorrect, so fix it. [rjw: Changelog] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/e_powersaver.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c
index 324aff20aeef..a60efaeb4cf8 100644
--- a/drivers/cpufreq/e_powersaver.c
+++ b/drivers/cpufreq/e_powersaver.c
@@ -161,6 +161,9 @@ postchange:
current_multiplier);
}
#endif
+ if (err)
+ freqs.new = freqs.old;
+
cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
return err;
}