mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
mptcp: use list_first_entry_or_null
Use list_first_entry_or_null to simplify the code. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
35ed87add7
commit
a386bc5b21
@ -232,10 +232,7 @@ static inline struct mptcp_data_frag *mptcp_rtx_head(const struct sock *sk)
|
||||
{
|
||||
struct mptcp_sock *msk = mptcp_sk(sk);
|
||||
|
||||
if (list_empty(&msk->rtx_queue))
|
||||
return NULL;
|
||||
|
||||
return list_first_entry(&msk->rtx_queue, struct mptcp_data_frag, list);
|
||||
return list_first_entry_or_null(&msk->rtx_queue, struct mptcp_data_frag, list);
|
||||
}
|
||||
|
||||
struct mptcp_subflow_request_sock {
|
||||
|
Loading…
Reference in New Issue
Block a user