Browse Source

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>
Colin Ian King 12 years ago
parent
commit
84764a415c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c

+ 1 - 1
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c

@@ -289,7 +289,7 @@ void for_every_cpu(void (func)(int))
 			"cpu%u %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n",
 			&cpu);
 		if (retval != 1)
-			return;
+			break;
 
 		func(cpu);
 	}