diff options
author | Arnaldo Carvalho de Melo <[email protected]> | 2016-06-22 10:10:52 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-06-22 10:10:52 -0300 |
commit | 61b3f66a3f99bb8a6a5145b1c2bd7eb98bf64748 (patch) | |
tree | 01c2fefe5b3c46c0ccee0afa098f0a8f0ff1b6fd | |
parent | e1446551e60a7773c3acf3c55bb9449d70127882 (diff) |
perf tests time-to-tsc: No need to disable an event before deleting it
Because at the destructor we will call close() and that will do the
disable. And we destructors can accept NULL, just like free(), so no
need to check it.
Cc: Adrian Hunter <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Jiri Olsa <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r-- | tools/perf/arch/x86/tests/perf-time-to-tsc.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/arch/x86/tests/perf-time-to-tsc.c b/tools/perf/arch/x86/tests/perf-time-to-tsc.c index d4aa567a29c4..5c76cc83186a 100644 --- a/tools/perf/arch/x86/tests/perf-time-to-tsc.c +++ b/tools/perf/arch/x86/tests/perf-time-to-tsc.c @@ -154,10 +154,6 @@ next_event: err = 0; out_err: - if (evlist) { - perf_evlist__disable(evlist); - perf_evlist__delete(evlist); - } - + perf_evlist__delete(evlist); return err; } |