cpufreq: stats: don't check for freq table while freeing stats
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 6 Jan 2015 15:39:04 +0000 (21:09 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 23 Jan 2015 22:06:43 +0000 (23:06 +0100)
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>
drivers/cpufreq/cpufreq_stats.c

index 21bec770569df6ab336a8814334addd31078d740..e9d68420b8765289319b4a1fc5184ac8a42c8a4a 100644 (file)
@@ -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);
 }