perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new())
authorYueHaibing <yuehaibing@huawei.com>
Wed, 2 Sep 2020 14:05:26 +0000 (22:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:22 +0000 (19:14 +0200)
commit594adc1bda7ab94a739702f0382667045c80c2a8
tree1817592b67e8a4df9276a711eb609b3e463a408f
parentf42f9c0d115eb30b16e4efb7c0ba5bd42194c306
perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new())

[ Upstream commit e4d71f79cf5c10fa8bc6f5d3bebea570c9c438f1 ]

In case of error, the function perf_session__new() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR()

Committer notes:

This wasn't compiling due to an extraneous '{' not matched by a '}', fix
it.

Fixes: 13edc237200c ("perf bench: Add a multi-threaded synthesize benchmark")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20200902140526.26916-1-yuehaibing@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/bench/synthesize.c