Skip to content

Commit

Permalink
cpufreq: stats: don't check for freq table while freeing stats
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Viresh Kumar <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
vireshk authored and rafaeljw committed Jan 23, 2015
1 parent 9531347 commit f93dbbb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f93dbbb

Please sign in to comment.