Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Viresh Kumar and committed by
Rafael J. Wysocki
567f4f67 e15d8309

+3
+3
drivers/cpufreq/e_powersaver.c
··· 161 161 current_multiplier); 162 162 } 163 163 #endif 164 + if (err) 165 + freqs.new = freqs.old; 166 + 164 167 cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); 165 168 return err; 166 169 }