Skip to content

Commit

Permalink
tools/power x86_energy_perf_policy: close /proc/stat in for_every_cpu()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Len Brown committed Nov 30, 2012
1 parent 889facb commit 84764a4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 84764a4

Please sign in to comment.