cpufreq: remove double calls to moudle_get/put in userspace governor
PATCH 1/1 cpufreq: remove double calls to moudle_get/put in userspace governor
The cpufreq core properly gets and puts the modules it calls, including governors. So there's no need to keep the racy in-module calls in cpufreq_userspace denoting otherwise.
Signed-off-by Dominik Brodowski <[email protected]>
drivers/cpufreq/cpufreq_userspace.c +1 -2
@@ -515,7 +515,7 @@unsigned int cpu = policy->cpu;switch (event) {case CPUFREQ_GOV_START : -if ((!cpu_online (cpu)) || (!try_module_get (THIS_MODULE ))) +if (!cpu_online (cpu))return -EINVAL ;BUG_ON (!policy->cur);down (&userspace_sem);
@@ -534,7 +534,6 @@ cpu_max_freq[cpu] =0 ;sysfs_remove_file (&policy->kobj, &freq_attr_scaling_setspeed.attr);up (&userspace_sem); -module_put (THIS_MODULE );break ;case CPUFREQ_GOV_LIMITS :down (&userspace_sem);