diff options
| author | Zhen Lei <[email protected]> | 2020-11-24 10:36:52 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-11-27 17:21:23 +0000 |
| commit | 9713070028b9ab317f395ee130fa2c4ea741bab4 (patch) | |
| tree | 1ac88c70344c5c86b648563da991b649479e6893 /tools/perf/builtin-diff.c | |
| parent | perf tools: Update copy of libbpf's hashmap.c (diff) | |
| download | kernel-9713070028b9ab317f395ee130fa2c4ea741bab4.tar.gz kernel-9713070028b9ab317f395ee130fa2c4ea741bab4.zip | |
perf diff: Fix error return value in __cmd_diff()
An appropriate return value should be set on the failed path.
Fixes: 2a09a84c720b436a ("perf diff: Support hot streams comparison")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Zhen Lei <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-diff.c')
| -rw-r--r-- | tools/perf/builtin-diff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c index 584e2e1a3793..cefc71506409 100644 --- a/tools/perf/builtin-diff.c +++ b/tools/perf/builtin-diff.c @@ -1222,8 +1222,10 @@ static int __cmd_diff(void) if (compute == COMPUTE_STREAM) { d->evlist_streams = evlist__create_streams( d->session->evlist, 5); - if (!d->evlist_streams) + if (!d->evlist_streams) { + ret = -ENOMEM; goto out_delete; + } } } |
