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

ipv6: remove useless assignment to newinet in tcp_v6_syn_recv_sock()

The newinet value is initialized with inet_sk() in a block code to
handle sockets for the ETH_P_IP protocol. Along this code path,
newinet is never read. Thus, assignment to newinet is needless and
can be removed.

Signed-off-by: Nghia Le <nghialm78@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20211104143740.32446-1-nghialm78@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Nghia Le and committed by
Jakub Kicinski
70bf363d 9bea6aa4

-1
-1
net/ipv6/tcp_ipv6.c
··· 1263 1263 1264 1264 inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk); 1265 1265 1266 - newinet = inet_sk(newsk); 1267 1266 newnp = tcp_inet6_sk(newsk); 1268 1267 newtp = tcp_sk(newsk); 1269 1268