tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file

[ Upstream commit 663546903c835fe46308b1b1e53d32d1f2b33da9 ]

This script is supposed to be allowed to run with regular user
privileges if a previously captured trace is being post processed.

Commit fbe313884d (tools/power/x86/intel_pstate_tracer: Free the
trace buffer memory) introduced a bug that breaks that option.

Commit 35459105de (tools/power/x86/intel_pstate_tracer: Add
optional setting of trace buffer memory allocation) moved the code
but kept the bug.

This patch fixes the issue.

Fixes: 35459105de (tools/power/x86/intel_pstate_tracer: Add optional ...)
Signed-off-by: Doug Smythies <dsmythies@telus.net>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Doug Smythies 2018-12-17 23:34:04 -08:00 committed by Greg Kroah-Hartman
parent 4cd197bfa6
commit 1157c2683c

View file

@ -585,9 +585,9 @@ current_max_cpu = 0
read_trace_data(filename)
clear_trace_file()
# Free the memory
if interval:
clear_trace_file()
# Free the memory
free_trace_buffer()
if graph_data_present == False: