Skip to content

Commit 84764a4

Browse files
Colin Ian Kinglenb
authored andcommitted
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>
1 parent 889facb commit 84764a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void for_every_cpu(void (func)(int))
289289
"cpu%u %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n",
290290
&cpu);
291291
if (retval != 1)
292-
return;
292+
break;
293293

294294
func(cpu);
295295
}

0 commit comments

Comments
 (0)