diff options
Diffstat (limited to 'tools/perf/builtin-probe.c')
-rw-r--r-- | tools/perf/builtin-probe.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c index 61c6d70732c9..e4a4da32a568 100644 --- a/tools/perf/builtin-probe.c +++ b/tools/perf/builtin-probe.c | |||
@@ -65,8 +65,10 @@ static int parse_probe_event(const char *str) | |||
65 | int ret; | 65 | int ret; |
66 | 66 | ||
67 | pr_debug("probe-definition(%d): %s\n", params.nevents, str); | 67 | pr_debug("probe-definition(%d): %s\n", params.nevents, str); |
68 | if (++params.nevents == MAX_PROBES) | 68 | if (++params.nevents == MAX_PROBES) { |
69 | die("Too many probes (> %d) are specified.", MAX_PROBES); | 69 | pr_err("Too many probes (> %d) were specified.", MAX_PROBES); |
70 | return -1; | ||
71 | } | ||
70 | 72 | ||
71 | /* Parse a perf-probe command into event */ | 73 | /* Parse a perf-probe command into event */ |
72 | ret = parse_perf_probe_command(str, pev); | 74 | ret = parse_perf_probe_command(str, pev); |
@@ -84,7 +86,9 @@ static int parse_probe_event_argv(int argc, const char **argv) | |||
84 | len = 0; | 86 | len = 0; |
85 | for (i = 0; i < argc; i++) | 87 | for (i = 0; i < argc; i++) |
86 | len += strlen(argv[i]) + 1; | 88 | len += strlen(argv[i]) + 1; |
87 | buf = xzalloc(len + 1); | 89 | buf = zalloc(len + 1); |
90 | if (buf == NULL) | ||
91 | return -ENOMEM; | ||
88 | len = 0; | 92 | len = 0; |
89 | for (i = 0; i < argc; i++) | 93 | for (i = 0; i < argc; i++) |
90 | len += sprintf(&buf[len], "%s ", argv[i]); | 94 | len += sprintf(&buf[len], "%s ", argv[i]); |