Skip to content

Commit

Permalink
cpufreq: e_powersaver: call CPUFREQ_POSTCHANGE notfier in error cases
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Viresh Kumar authored and Rafael J. Wysocki committed Jun 24, 2013
1 parent e15d830 commit 567f4f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/cpufreq/e_powersaver.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ static int eps_set_state(struct eps_cpu_data *centaur,
current_multiplier);
}
#endif
if (err)
freqs.new = freqs.old;

cpufreq_notify_transition(policy, &freqs, CPUFREQ_POSTCHANGE);
return err;
}
Expand Down

0 comments on commit 567f4f6

Please sign in to comment.