aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/x86
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2012-11-15 14:02:00 -0500
committerLen Brown <len.brown@intel.com>2012-11-30 01:09:44 -0500
commit84764a415c707b43e751deb579a421776f190a95 (patch)
treed6afd249ae50ee2ff46cf4285c22d310ac100b0c /tools/power/x86
parent889facbee3e67dbc8eb29d8ee7fd66d33a647bfc (diff)
tools/power x86_energy_perf_policy: close /proc/stat in for_every_cpu()
Instead of returning out of for_every_cpu() we should break out of the loop= which will then tidy up correctly by closing the file /proc/stat. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'tools/power/x86')
-rw-r--r--tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
index 33c5c7ee148f..40b3e5482f8a 100644
--- a/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
+++ b/tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
@@ -289,7 +289,7 @@ void for_every_cpu(void (func)(int))
289 "cpu%u %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n", 289 "cpu%u %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n",
290 &cpu); 290 &cpu);
291 if (retval != 1) 291 if (retval != 1)
292 return; 292 break;
293 293
294 func(cpu); 294 func(cpu);
295 } 295 }