NFS: remove redundant initialization of variable result
authorColin Ian King <colin.king@canonical.com>
Fri, 24 Jul 2020 10:44:41 +0000 (11:44 +0100)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 28 Jul 2020 15:04:06 +0000 (11:04 -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: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/direct.c

index 3d113cf8908ac93b63276197d09f4330132aca6d..99b110431923adc05d877930e854a57bca2ff7ea 100644 (file)
@@ -901,7 +901,7 @@ static ssize_t nfs_direct_write_schedule_iovec(struct nfs_direct_req *dreq,
  */
 ssize_t nfs_file_direct_write(struct kiocb *iocb, struct iov_iter *iter)
 {
-       ssize_t result = -EINVAL, requested;
+       ssize_t result, requested;
        size_t count;
        struct file *file = iocb->ki_filp;
        struct address_space *mapping = file->f_mapping;