From: Colin Ian King Date: Wed, 27 May 2020 12:56:11 +0000 (+0100) Subject: NFS: remove redundant initialization of variable result X-Git-Tag: v5.10.7~2353^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=86b936672e55388bd5674e50e5ff4ef95f3477b8;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index a57e7c7..bb63e2b 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);