diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c index ade27d636..f909e440b 100755 --- a/net/ipv4/tcp_bpf.c +++ b/net/ipv4/tcp_bpf.c @@ -511,7 +511,7 @@ out_err: err = sk_stream_error(sk, msg->msg_flags, err); release_sock(sk); sk_psock_put(sk, psock); - return copied > 0 ? copied : err; + return copied ? copied : err; } static int tcp_bpf_sendpage(struct sock *sk, struct page *page, int offset,