diff options
author | Yu Kuai <[email protected]> | 2021-05-17 16:12:54 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2021-06-01 10:56:27 -0300 |
commit | d3fddc355a4a4415e8d43d1faae1be713d65cf5e (patch) | |
tree | 93ed5cfae410f85c8e502f9a902c699151df9414 /lib/mpi/mpi-sub-ui.c | |
parent | 4f2abe91922ba02bb419d91d92a518e4c805220b (diff) |
perf stat: Fix error return code in bperf__load()
Fix to return a negative error code from the error handling case instead
of 0, as done elsewhere in this function.
Committer notes:
Added the missing {} for the now multiline 'if' block, fixing this error:
CC /tmp/build/perf/util/bpf_counter.o
util/bpf_counter.c: In function ‘bperf__load’:
util/bpf_counter.c:523:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
523 | if (evsel->bperf_leader_link_fd < 0 &&
| ^~
util/bpf_counter.c:526:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
526 | goto out;
| ^~~~
cc1: all warnings being treated as errors
Fixes: 7fac83aaf2eecc9e ("perf stat: Introduce 'bperf' to share hardware PMCs with BPF")
Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Yu Kuai <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Daniel Borkmann <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Yu Kuai <[email protected]>
Cc: Zhang Yi <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions