Commit 34ef1ed1 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller
Browse files

net/tls: make allocation failure unlikely



Make sure GCC realizes it's unlikely that allocations will fail.

Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: default avatarDirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93277b25
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -452,9 +452,8 @@ static int tls_push_data(struct sock *sk,
	max_open_record_len = TLS_MAX_PAYLOAD_SIZE +
			      prot->prepend_size;
	do {
		rc = tls_do_allocation(sk, ctx, pfrag,
				       prot->prepend_size);
		if (rc) {
		rc = tls_do_allocation(sk, ctx, pfrag, prot->prepend_size);
		if (unlikely(rc)) {
			rc = sk_stream_wait_memory(sk, &timeo);
			if (!rc)
				continue;