diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-04-07 04:36:58 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-08 19:41:50 -0400 |
commit | 9b55f55af8f017fec053c7eb0675241d057936da (patch) | |
tree | 6369bd682f0737072283db66b0d526c08eb67192 /drivers/cpufreq/acpi-cpufreq.c | |
parent | a794d6138cda391b6a9ba28c4cf27651415669c6 (diff) |
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>
Diffstat (limited to 'drivers/cpufreq/acpi-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/acpi-cpufreq.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 67a612e22179..a24a0c05d7f8 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -878,14 +878,12 @@ static int acpi_cpufreq_cpu_exit(struct cpufreq_policy *policy) | |||
878 | 878 | ||
879 | pr_debug("acpi_cpufreq_cpu_exit\n"); | 879 | pr_debug("acpi_cpufreq_cpu_exit\n"); |
880 | 880 | ||
881 | if (data) { | 881 | policy->fast_switch_possible = false; |
882 | policy->fast_switch_possible = false; | 882 | policy->driver_data = NULL; |
883 | policy->driver_data = NULL; | 883 | acpi_processor_unregister_performance(data->acpi_perf_cpu); |
884 | acpi_processor_unregister_performance(data->acpi_perf_cpu); | 884 | free_cpumask_var(data->freqdomain_cpus); |
885 | free_cpumask_var(data->freqdomain_cpus); | 885 | kfree(data->freq_table); |
886 | kfree(data->freq_table); | 886 | kfree(data); |
887 | kfree(data); | ||
888 | } | ||
889 | 887 | ||
890 | return 0; | 888 | return 0; |
891 | } | 889 | } |