cpufreq: ACPI: policy->driver_data can't be NULL in ->exit()
Its always set by ->init() and so it will always be there in ->exit(). There is no need to have a special check for just that. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> [ rjw: Rebase ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
committed by
Rafael J. Wysocki
parent
a794d6138c
commit
9b55f55af8
@@ -878,14 +878,12 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy)
|
|||||||
|
|
||||||
pr_debug("acpi_cpufreq_cpu_exit\n");
|
pr_debug("acpi_cpufreq_cpu_exit\n");
|
||||||
|
|
||||||
if (data) {
|
policy->fast_switch_possible = false;
|
||||||
policy->fast_switch_possible = false;
|
policy->driver_data = NULL;
|
||||||
policy->driver_data = NULL;
|
acpi_processor_unregister_performance(data->acpi_perf_cpu);
|
||||||
acpi_processor_unregister_performance(data->acpi_perf_cpu);
|
free_cpumask_var(data->freqdomain_cpus);
|
||||||
free_cpumask_var(data->freqdomain_cpus);
|
kfree(data->freq_table);
|
||||||
kfree(data->freq_table);
|
kfree(data);
|
||||||
kfree(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user