cpufreq: Avoid false-positive WARN_ON()s in cpufreq_update_policy()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Jun 2016 01:29:29 +0000 (03:29 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 28 Jun 2016 01:29:29 +0000 (03:29 +0200)
commit742c87bf27d3b715820da6f8a81d6357adbf18f8
tree31c96e9d4378c23b15a80a21f2f487fcd9bc62ce
parentca5eda5d3db6026080cff267459625c87c43e9ab
cpufreq: Avoid false-positive WARN_ON()s in cpufreq_update_policy()

CPU notifications from the firmware coming in when cpufreq is
suspended cause cpufreq_update_current_freq() to return 0 which
triggers the WARN_ON() in cpufreq_update_policy() for no reason.

Avoid that by checking cpufreq_suspended before calling
cpufreq_update_current_freq().

Fixes: c9d9c929e674 (cpufreq: Abort cpufreq_update_current_freq() for cpufreq_suspended set)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: 4.6+ <stable@vger.kernel.org> # 4.6+
drivers/cpufreq/cpufreq.c