]> git.baikalelectronics.ru Git - kernel.git/commit
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)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 3 Sep 2020 18:55:56 +0000 (15:55 -0300)
commit68b4da3a7db827cc7409e327d7bb0b7020b24087
tree12c410eb7d5fbe25587de9978b07781594d2513a
parent611924cb0993b0b8cf5073fb0c32dec9f961b8d3
perf bench: The do_run_multi_threaded() function must use IS_ERR(perf_session__new())

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: 7e62ad1b26ae ("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>
tools/perf/bench/synthesize.c