]> git.baikalelectronics.ru Git - kernel.git/commit
thermal: cpufreq_cooling: Check the policy first in cpufreq_cooling_register()
authorXuewen Yan <xuewen.yan@unisoc.com>
Thu, 25 Aug 2022 11:40:17 +0000 (19:40 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 3 Sep 2022 18:07:36 +0000 (20:07 +0200)
commit960667a6a48d7f433c739edfef7e79c1908c85d1
tree1f78c2ca05bc80e4c9d163563f43845c9c007da5
parent67f050b8baaf9f5c831236f218296199bb8b3ebd
thermal: cpufreq_cooling: Check the policy first in cpufreq_cooling_register()

Since the policy needs to be accessed first when obtaining cpu devices,
first check whether the policy is legal before this.

Fixes: 60cd75b84943 ("thermal: cpu_cooling: Switch to QoS requests for freq limits")
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/cpufreq_cooling.c