Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361898
b: refs/heads/master
c: 187da1d
h: refs/heads/master
v: v3
  • Loading branch information
viresh kumar authored and Rafael J. Wysocki committed Mar 25, 2013
1 parent fbf36d6 commit 0862db1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05e99c8cf9d4e53ef6e016815db40a89a6156529
refs/heads/master: 187da1d97f3a949b967274d7ee2f95d3a4f39251
12 changes: 8 additions & 4 deletions trunk/drivers/cpufreq/cpufreq_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,19 @@ static void cpufreq_stats_free_sysfs(unsigned int cpu)
{
struct cpufreq_policy *policy = cpufreq_cpu_get(cpu);

if (!cpufreq_frequency_get_table(cpu))
if (!policy)
return;

if (policy && !policy_is_shared(policy)) {
if (!cpufreq_frequency_get_table(cpu))
goto put_ref;

if (!policy_is_shared(policy)) {
pr_debug("%s: Free sysfs stat\n", __func__);
sysfs_remove_group(&policy->kobj, &stats_attr_group);
}
if (policy)
cpufreq_cpu_put(policy);

put_ref:
cpufreq_cpu_put(policy);
}

static int cpufreq_stats_create_table(struct cpufreq_policy *policy,
Expand Down

0 comments on commit 0862db1

Please sign in to comment.