]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - tools/perf/builtin-top.c
Merge branches 'pm-core', 'pm-qos', 'pm-domains' and 'pm-opp'
[linux.git] / tools / perf / builtin-top.c
index 3df4178ba378167aa6988f8b5a19f470e1607eb0..5a7fd7af3a6de39d4a0d5c5ed5a758c92aeb88f3 100644 (file)
@@ -643,7 +643,7 @@ static void *display_thread(void *arg)
                case -1:
                        if (errno == EINTR)
                                continue;
-                       /* Fall trhu */
+                       __fallthrough;
                default:
                        c = getc(stdin);
                        tcsetattr(0, TCSAFLUSH, &save);
@@ -859,7 +859,7 @@ static void perf_top__mmap_read(struct perf_top *top)
 
 static int perf_top__start_counters(struct perf_top *top)
 {
-       char msg[512];
+       char msg[BUFSIZ];
        struct perf_evsel *counter;
        struct perf_evlist *evlist = top->evlist;
        struct record_opts *opts = &top->record_opts;
@@ -1216,7 +1216,9 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
        if (top.evlist == NULL)
                return -ENOMEM;
 
-       perf_config(perf_top_config, &top);
+       status = perf_config(perf_top_config, &top);
+       if (status)
+               return status;
 
        argc = parse_options(argc, argv, options, top_usage, 0);
        if (argc)