bpf_getsockopt bpf call sets the ret variable to zero and
never changes it. What's worse in case CONFIG_INET is
not selected the variable is completely unused generating
a warning.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Lawrence Brakmo <brakmo@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
int, level, int, optname, char *, optval, int, optlen)
{
struct sock *sk = bpf_sock->sk;
- int ret = 0;
if (!sk_fullsock(sk))
goto err_clear;
} else {
goto err_clear;
}
- return ret;
+ return 0;
#endif
err_clear:
memset(optval, 0, optlen);