summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/cpufreq_stats.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-01-06 18:39:04 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-24 01:06:43 +0300
commitf93dbbbd108936b18b3230af36d9a36866ce69a7 (patch)
tree1ca2f65cd9fe945bd8185b18b73879959c1216bb /drivers/cpufreq/cpufreq_stats.c
parent9531347c61f689ac6de899a03ce91be4157277f7 (diff)
downloadlinux-f93dbbbd108936b18b3230af36d9a36866ce69a7.tar.xz
cpufreq: stats: don't check for freq table while freeing stats
While we allocate stats, we do need to check if freq-table is present or not as we need to use it then. But while freeing stats, all we need to know is if stats holds a valid pointer value. There is no use of testing if cpufreq table is present or not. Don't check it. Reviewed-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_stats.c')
-rw-r--r--drivers/cpufreq/cpufreq_stats.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 21bec770569d..e9d68420b876 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -168,8 +168,7 @@ static void cpufreq_stats_free_table(unsigned int cpu)
if (!policy)
return;
- if (cpufreq_frequency_get_table(policy->cpu))
- __cpufreq_stats_free_table(policy);
+ __cpufreq_stats_free_table(policy);
cpufreq_cpu_put(policy);
}