Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/tls: Remove redundant initialization of record

record is being initialized to ctx->open_record but this is never
read as record is overwritten later on. Remove the redundant
initialization.

Cleans up the following clang-analyzer warning:

net/tls/tls_device.c:421:26: warning: Value stored to 'record' during
its initialization is never read [clang-analyzer-deadcode.DeadStores].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jiapeng Chong and committed by
David S. Miller
3afef8c7 4db6187d

+1 -1
+1 -1
net/tls/tls_device.c
··· 418 418 struct tls_context *tls_ctx = tls_get_ctx(sk); 419 419 struct tls_prot_info *prot = &tls_ctx->prot_info; 420 420 struct tls_offload_context_tx *ctx = tls_offload_ctx_tx(tls_ctx); 421 - struct tls_record_info *record = ctx->open_record; 421 + struct tls_record_info *record; 422 422 int tls_push_record_flags; 423 423 struct page_frag *pfrag; 424 424 size_t orig_size = size;