From: Michael Opdenacker Date: Tue, 15 Apr 2014 08:06:50 +0000 (+0200) Subject: cif: fix dead code X-Git-Tag: Ubuntu-5.2.0-15.16~13595^2 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=1f80c0cc39e587edd06a36b43ba3a3b09d4ac428;p=mirror_ubuntu-eoan-kernel.git cif: fix dead code This issue was found by Coverity (CID 1202536) This proposes a fix for a statement that creates dead code. The "rc < 0" statement is within code that is run with "rc > 0". It seems like "err < 0" was meant to be used here. This way, the error code is returned by the function. Signed-off-by: Michael Opdenacker Acked-by: Al Viro Signed-off-by: Steve French --- diff --git a/fs/cifs/file.c b/fs/cifs/file.c index a875eedfd928..5ed03e0b8b40 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -2599,7 +2599,7 @@ cifs_writev(struct kiocb *iocb, const struct iovec *iov, ssize_t err; err = generic_write_sync(file, iocb->ki_pos - rc, rc); - if (rc < 0) + if (err < 0) rc = err; } } else {