]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: unlock when failing cpufreq_update_policy()
authorAaron Plattner <aplattner@nvidia.com>
Wed, 18 Jun 2014 18:27:32 +0000 (11:27 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 18 Jun 2014 19:52:20 +0000 (21:52 +0200)
commit92e0f8d1670a65c6dd81d302a8c729ee8e7f75df
tree6118b6695bc29d4bad0a0cdb36ee295903574711
parent1e6a50cce2d1893da965282fc3b10305c69241bb
cpufreq: unlock when failing cpufreq_update_policy()

Commit d19187ca8953 introduced a failure path to cpufreq_update_policy() if
cpufreq_driver->get(cpu) returns NULL.  However, it jumps to the 'no_policy'
label, which exits without unlocking any of the locks the function acquired
earlier.  This causes later calls into cpufreq to hang.

Fix this by creating a new 'unlock' label and jumping to that instead.

Fixes: d19187ca8953 ("cpufreq: Return error if ->get() failed in cpufreq_update_policy()")
Link: https://devtalk.nvidia.com/default/topic/751903/kernel-3-15-and-nv-drivers-337-340-failed-to-initialize-the-nvidia-kernel-module-gtx-550-ti-/
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Cc: 3.15+ <stable@vger.kernel.org> # 3.15+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c