]> git.baikalelectronics.ru Git - kernel.git/commitdiff
NFS: remove redundant initialization of variable result
authorColin Ian King <colin.king@canonical.com>
Wed, 27 May 2020 12:56:11 +0000 (13:56 +0100)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 11 Jun 2020 17:33:48 +0000 (13:33 -0400)
The variable result 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: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/direct.c

index a57e7c72c7f475dbc5861dc8161a3cb00b3526d8..bb63e2b93ff723b56e3ae5c01071d79566585f42 100644 (file)
@@ -446,7 +446,7 @@ ssize_t nfs_file_direct_read(struct kiocb *iocb, struct iov_iter *iter)
        struct inode *inode = mapping->host;
        struct nfs_direct_req *dreq;
        struct nfs_lock_context *l_ctx;
-       ssize_t result = -EINVAL, requested;
+       ssize_t result, requested;
        size_t count = iov_iter_count(iter);
        nfs_add_stats(mapping->host, NFSIOS_DIRECTREADBYTES, count);