提交 97130700 编写于 作者: Z Zhen Lei 提交者: Arnaldo Carvalho de Melo

perf diff: Fix error return value in __cmd_diff()

An appropriate return value should be set on the failed path.

Fixes: 2a09a84c ("perf diff: Support hot streams comparison")
Reported-by: NHulk Robot <hulkci@huawei.com>
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Acked-by: NJiri Olsa <jolsa@redhat.com>
Acked-by: NNamhyung Kim <namhyung@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20201124103652.438-1-thunder.leizhen@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 3b13eaf0
......@@ -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;
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册