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 731150d52799..0a691ea7654a 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -1224,12 +1224,7 @@ static inline void sk_tx_queue_clear(struct sock *sk) | |||
1224 | 1224 | ||
1225 | static inline int sk_tx_queue_get(const struct sock *sk) | 1225 | static inline int sk_tx_queue_get(const struct sock *sk) |
1226 | { | 1226 | { |
1227 | return sk->sk_tx_queue_mapping; | 1227 | return sk ? sk->sk_tx_queue_mapping : -1; |
1228 | } | ||
1229 | |||
1230 | static inline bool sk_tx_queue_recorded(const struct sock *sk) | ||
1231 | { | ||
1232 | return (sk && sk->sk_tx_queue_mapping >= 0); | ||
1233 | } | 1228 | } |
1234 | 1229 | ||
1235 | static inline void sk_set_socket(struct sock *sk, struct socket *sock) | 1230 | static inline void sk_set_socket(struct sock *sk, struct socket *sock) |