SUNRPC: remove redundant assignments to variable status
authorColin Ian King <colin.king@canonical.com>
Fri, 28 Feb 2020 23:44:14 +0000 (23:44 +0000)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 16 Mar 2020 14:10:36 +0000 (10:10 -0400)
The variable status is being initialized with a value that is never
read and it is being updated later with a new value.  The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
net/sunrpc/xprtsock.c

index d86c664..c9e0399 100644 (file)
@@ -1970,7 +1970,7 @@ static int xs_local_setup_socket(struct sock_xprt *transport)
        struct rpc_xprt *xprt = &transport->xprt;
        struct file *filp;
        struct socket *sock;
-       int status = -EIO;
+       int status;
 
        status = __sock_create(xprt->xprt_net, AF_LOCAL,
                                        SOCK_STREAM, 0, &sock, 1);