aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sock.h')
-rw-r--r--include/net/sock.h7
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
1227static inline int sk_tx_queue_get(const struct sock *sk) 1227static 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
1232static inline bool sk_tx_queue_recorded(const struct sock *sk)
1233{
1234 return (sk && sk->sk_tx_queue_mapping >= 0);
1235} 1230}
1236 1231
1237static inline void sk_set_socket(struct sock *sk, struct socket *sock) 1232static inline void sk_set_socket(struct sock *sk, struct socket *sock)