diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 3100e71f0c3d..a441c9cdd625 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1226,12 +1226,7 @@ static inline void sk_tx_queue_clear(struct sock *sk) | |||
1226 | 1226 | ||
1227 | static inline int sk_tx_queue_get(const struct sock *sk) | 1227 | static inline int sk_tx_queue_get(const struct sock *sk) |
1228 | { | 1228 | { |
1229 | return sk->sk_tx_queue_mapping; | 1229 | return sk ? sk->sk_tx_queue_mapping : -1; |
1230 | } | ||
1231 | |||
1232 | static inline bool sk_tx_queue_recorded(const struct sock *sk) | ||
1233 | { | ||
1234 | return (sk && sk->sk_tx_queue_mapping >= 0); | ||
1235 | } | 1230 | } |
1236 | 1231 | ||
1237 | static inline void sk_set_socket(struct sock *sk, struct socket *sock) | 1232 | static inline void sk_set_socket(struct sock *sk, struct socket *sock) |