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 <adrian.hunter@intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-i98mcyfkkjh5qp62dle27ac1@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent e1446551
......@@ -154,10 +154,6 @@ int test__perf_time_to_tsc(int subtest __maybe_unused)
err = 0;
out_err:
if (evlist) {
perf_evlist__disable(evlist);
perf_evlist__delete(evlist);
}
perf_evlist__delete(evlist);
return err;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment