NFS: remove redundant pointer clnt
authorColin Ian King <colin.king@canonical.com>
Tue, 9 Jun 2020 23:22:57 +0000 (00:22 +0100)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 21 Sep 2020 14:21:08 +0000 (10:21 -0400)
The pointer clnt is being initialized with a value that is never
read and so this is assignment redundant and can be removed. The
pointer can removed because it is being used as a temporary
variable and it is clearer to make the direct assignment and remove
it completely.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4proc.c

index 6e95c85..1d23dc6 100644 (file)
@@ -9693,7 +9693,6 @@ _nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
                .rpc_argp = &args,
                .rpc_resp = &res,
        };
-       struct rpc_clnt *clnt = server->client;
        struct nfs4_call_sync_data data = {
                .seq_server = server,
                .seq_args = &args.seq_args,
@@ -9710,8 +9709,7 @@ _nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
        int status;
 
        if (use_integrity) {
-               clnt = server->nfs_client->cl_rpcclient;
-               task_setup.rpc_client = clnt;
+               task_setup.rpc_client = server->nfs_client->cl_rpcclient;
 
                cred = nfs4_get_clid_cred(server->nfs_client);
                msg.rpc_cred = cred;