net/tls: simplify the tls_set_sw_offload function

Assigning crypto_info variables in advance can simplify the logic
of accessing value and move related local variables to a smaller
scope.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Tianjia Zhang 2021-11-29 19:10:14 +08:00 • committed by David S. Miller
commit dc2724a64e