diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 7c0632c7e870..aeeec62992ca 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -507,9 +507,7 @@ int sk_set_peek_off(struct sock *sk, int val); | |||
507 | static inline int sk_peek_offset(struct sock *sk, int flags) | 507 | static inline int sk_peek_offset(struct sock *sk, int flags) |
508 | { | 508 | { |
509 | if (unlikely(flags & MSG_PEEK)) { | 509 | if (unlikely(flags & MSG_PEEK)) { |
510 | s32 off = READ_ONCE(sk->sk_peek_off); | 510 | return READ_ONCE(sk->sk_peek_off); |
511 | if (off >= 0) | ||
512 | return off; | ||
513 | } | 511 | } |
514 | 512 | ||
515 | return 0; | 513 | return 0; |