projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'spi/fix/atmel' into spi-linus
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
thermal
/
cpu_cooling.c
diff --git
a/drivers/thermal/cpu_cooling.c
b/drivers/thermal/cpu_cooling.c
index 82e15dbb3ac7a1b3b9063a1577c61f3b1025fb27..d17902886c3f28f31047b27f4ab52be0dceb67ec 100644
(file)
--- a/
drivers/thermal/cpu_cooling.c
+++ b/
drivers/thermal/cpu_cooling.c
@@
-322,6
+322,8
@@
static int cpufreq_thermal_notifier(struct notifier_block *nb,
if (cpumask_test_cpu(policy->cpu, ¬ify_device->allowed_cpus))
max_freq = notify_device->cpufreq_val;
if (cpumask_test_cpu(policy->cpu, ¬ify_device->allowed_cpus))
max_freq = notify_device->cpufreq_val;
+ else
+ return 0;
/* Never exceed user_policy.max */
if (max_freq > policy->user_policy.max)
/* Never exceed user_policy.max */
if (max_freq > policy->user_policy.max)
@@
-496,8
+498,12
@@
EXPORT_SYMBOL_GPL(cpufreq_cooling_register);
*/
void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
{
*/
void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)
{
- struct cpufreq_cooling_device *cpufreq_dev = cdev->devdata;
+ struct cpufreq_cooling_device *cpufreq_dev;
+
+ if (!cdev)
+ return;
+ cpufreq_dev = cdev->devdata;
mutex_lock(&cooling_cpufreq_lock);
cpufreq_dev_count--;
mutex_lock(&cooling_cpufreq_lock);
cpufreq_dev_count--;