summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-05-27 13:56:11 +0100
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-06-11 13:33:48 -0400
commit86b936672e55388bd5674e50e5ff4ef95f3477b8 (patch)
tree427f2502a861b889765636a80649ef0b78f50375 /fs
parent2ac3ddc723469c66846262e1d7954199ef95d6dc (diff)
NFS: remove redundant initialization of variable result
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index a57e7c72c7f4..bb63e2b93ff7 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -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);