mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-06 02:39:06 -05:00
sock: use hlist_entry_safe
Use hlist_entry_safe() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
c10aa71b9d
commit
6c59ebd356
1 changed files with 1 additions and 2 deletions
|
|
@ -544,8 +544,7 @@ static inline struct sock *sk_nulls_head(const struct hlist_nulls_head *head)
|
|||
|
||||
static inline struct sock *sk_next(const struct sock *sk)
|
||||
{
|
||||
return sk->sk_node.next ?
|
||||
hlist_entry(sk->sk_node.next, struct sock, sk_node) : NULL;
|
||||
return hlist_entry_safe(sk->sk_node.next, struct sock, sk_node);
|
||||
}
|
||||
|
||||
static inline struct sock *sk_nulls_next(const struct sock *sk)
|
||||
|
|
|
|||
Loading…
Reference in a new issue