]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Silence coverity false positive warning.
authorAlexei Starovoitov <ast@kernel.org>
Sun, 12 Dec 2021 02:08:19 +0000 (18:08 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Sun, 12 Dec 2021 02:08:19 +0000 (18:08 -0800)
commit8baa4aac2f5525956ee1c54382e9a53f2e0cebb1
treea8e5852788ed516cf435947dbf6e81d38efc034f
parent9e4dac220651e28782903543bc175e913f8fcd12
bpf: Silence coverity false positive warning.

Coverity issued the following warning:
6685            cands = bpf_core_add_cands(cands, main_btf, 1);
6686            if (IS_ERR(cands))
>>>     CID 1510300:    (RETURN_LOCAL)
>>>     Returning pointer "cands" which points to local variable "local_cand".
6687                    return cands;

It's a false positive.
Add ERR_CAST() to silence it.

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/btf.c