cpufreq: don't leave stale policy pointer in cdbs->cur_policy
authorJacob Shin <jacob.shin@amd.com>
Thu, 27 Jun 2013 20:02:12 +0000 (22:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Jun 2013 20:02:12 +0000 (22:02 +0200)
commit419e172145cf6c51d436a8bf4afcd17511f0ff79
treeddf65b39e5096a170f102b9b46e7e11b12cf600c
parent874e628f8b34cf4b3b7f471063841647c221f453
cpufreq: don't leave stale policy pointer in cdbs->cur_policy

Clear ->cur_policy when stopping a governor, or the ->cur_policy
pointer may be stale on systems with have_governor_per_policy when a
new policy is allocated due to CPU hotplug offline/online.

[rjw: Changelog]
Suggested-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq_governor.c