We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c10aa71 commit 6c59ebdCopy full SHA for 6c59ebd
include/net/sock.h
@@ -544,8 +544,7 @@ static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)
544
545
static inline struct sock *sk_next(const struct sock *sk)
546
{
547
- return sk->sk_node.next ?
548
- hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL;
+ return hlist_entry_safe(sk->sk_node.next, struct sock, sk_node);
549
}
550
551
static inline struct sock *sk_nulls_next(const struct sock *sk)
0 commit comments