net/handshake: remove redundant assignment to variable ret
authorColin Ian King <colin.i.king@gmail.com>
Mon, 15 Apr 2024 10:07:13 +0000 (11:07 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 17 Apr 2024 00:14:55 +0000 (17:14 -0700)
The variable is being assigned an value and then is being re-assigned
a new value in the next statement. The assignment is redundant and can
be removed.

Cleans up clang scan build warning:
net/handshake/tlshd.c:216:2: warning: Value stored to 'ret' is never
read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://lore.kernel.org/r/20240415100713.483399-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/handshake/tlshd.c

index d697f68..d6f5283 100644 (file)
@@ -213,7 +213,6 @@ static int tls_handshake_accept(struct handshake_req *req,
        if (!hdr)
                goto out_cancel;
 
-       ret = -EMSGSIZE;
        ret = nla_put_s32(msg, HANDSHAKE_A_ACCEPT_SOCKFD, fd);
        if (ret < 0)
                goto out_cancel;