Merge tag 'mac80211-for-john-2014-11-04' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-top.c
index 8ab9716db5931b3140f71a8714d1b1a24b963f06..0aa7747ff1390e0995a875a6c185697901cb9632 100644 (file)
@@ -1047,7 +1047,6 @@ parse_percent_limit(const struct option *opt, const char *arg,
 
 int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
 {
-       int status = -1;
        char errbuf[BUFSIZ];
        struct perf_top top = {
                .count_filter        = 5,
@@ -1165,6 +1164,10 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
                "perf top [<options>]",
                NULL
        };
+       int status = hists__init();
+
+       if (status < 0)
+               return status;
 
        top.evlist = perf_evlist__new();
        if (top.evlist == NULL)