summaryrefslogtreecommitdiff
path: root/net/tls
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-04-11 22:19:09 +0300
committerDavid S. Miller <davem@davemloft.net>2022-04-13 13:45:39 +0300
commit0775639ce1ca953503121e350d6b885366f56a52 (patch)
tree70914710f708813e663f23b6061e1294664be92c /net/tls
parenta30295c454725b293c7b2f45f6e60fcce0bc435e (diff)
downloadlinux-0775639ce1ca953503121e350d6b885366f56a52.tar.xz
tls: rx: reuse leave_on_list label for psock
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>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 461734a27297..fd19047fa6c6 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -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;
}