Commit 7f77a563f0c110a633b4ab0fec9f49d41630039a
Committed by
Rafael J. Wysocki
1 parent
f77f146599
Exists in
master
and in
20 other branches
cpufreq: powernow-k8: call CPUFREQ_POSTCHANGE notfier in error cases
PRECHANGE and POSTCHANGE notifiers must be called in groups, i.e. either both should be called or both shouldn't be. In case we have started PRECHANGE notifier and found an error, we must call POSTCHANGE notifier with freqs.new = freqs.old to guarantee that sequence of calling notifiers is complete. This patch fixes it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff
drivers/cpufreq/powernow-k8.c
... | ... | @@ -967,9 +967,9 @@ |
967 | 967 | |
968 | 968 | res = transition_fid_vid(data, fid, vid); |
969 | 969 | if (res) |
970 | - return res; | |
971 | - | |
972 | - freqs.new = find_khz_freq_from_fid(data->currfid); | |
970 | + freqs.new = freqs.old; | |
971 | + else | |
972 | + freqs.new = find_khz_freq_from_fid(data->currfid); | |
973 | 973 | |
974 | 974 | cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE); |
975 | 975 | return res; |