summaryrefslogtreecommitdiff
path: root/tools/perf/tests/sw-clock.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2014-01-04 00:25:49 +0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-01-13 17:06:22 +0400
commit983874d173568f584a5988888645725496c09f24 (patch)
treeb0c08482c765c885bd8c1b019b556377ba107956 /tools/perf/tests/sw-clock.c
parentf26e1c7cb279051d83e0b671f48b30fe88c2c788 (diff)
downloadlinux-983874d173568f584a5988888645725496c09f24.tar.xz
perf evlist: Auto unmap on destructor
Removing further boilerplate after making sure perf_evlist__munmap can be called multiple times for the same evlist. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-o0luenuld4abupm4nmrgzm6f@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/sw-clock.c')
-rw-r--r--tools/perf/tests/sw-clock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
index b366f0edca79..983d6b8562a8 100644
--- a/tools/perf/tests/sw-clock.c
+++ b/tools/perf/tests/sw-clock.c
@@ -90,7 +90,7 @@ static int __test__sw_clock_freq(enum perf_sw_ids clock_id)
err = perf_evlist__parse_sample(evlist, event, &sample);
if (err < 0) {
pr_debug("Error during parse sample\n");
- goto out_unmap_evlist;
+ goto out_delete_evlist;
}
total_periods += sample.period;
@@ -105,8 +105,6 @@ next_event:
err = -1;
}
-out_unmap_evlist:
- perf_evlist__munmap(evlist);
out_delete_evlist:
perf_evlist__delete(evlist);
return err;