Skip to content

Commit

Permalink
tls: rx: reuse leave_on_list label for psock
Browse files Browse the repository at this point in the history
The code is identical, we can save a few LoC.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jakub Kicinski authored and David S. Miller committed Apr 13, 2022
1 parent a30295c commit 0775639
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions net/tls/tls_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,14 +1775,10 @@ int tls_sw_recvmsg(struct sock *sk,
skb = tls_wait_data(sk, psock, flags & MSG_DONTWAIT, timeo, &err);
if (!skb) {
if (psock) {
int ret = sk_msg_recvmsg(sk, psock, msg, len,
flags);

if (ret > 0) {
decrypted += ret;
len -= ret;
continue;
}
chunk = sk_msg_recvmsg(sk, psock, msg, len,
flags);
if (chunk > 0)
goto leave_on_list;
}
goto recv_end;
}
Expand Down

0 comments on commit 0775639

Please sign in to comment.