aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMichael Opdenacker <michael.opdenacker@free-electrons.com>2014-04-15 04:06:50 -0400
committerSteve French <smfrench@gmail.com>2014-04-17 00:08:57 -0400
commit1f80c0cc39e587edd06a36b43ba3a3b09d4ac428 (patch)
tree68539f36bda4fae674846affe1f8464197f7371a /fs
parentbae9f746a18ee31bbeeb25ae6615805ed6eca173 (diff)
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 <michael.opdenacker@free-electrons.com> Acked-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/file.c2
1 files changed, 1 insertions, 1 deletions
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,
2599 ssize_t err; 2599 ssize_t err;
2600 2600
2601 err = generic_write_sync(file, iocb->ki_pos - rc, rc); 2601 err = generic_write_sync(file, iocb->ki_pos - rc, rc);
2602 if (rc < 0) 2602 if (err < 0)
2603 rc = err; 2603 rc = err;
2604 } 2604 }
2605 } else { 2605 } else {