Skip to content

Commit 1f80c0c

Browse files
Michael Opdenackersmfrench
authored andcommitted
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>
1 parent bae9f74 commit 1f80c0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/cifs/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2599,7 +2599,7 @@ cifs_writev(struct kiocb *iocb, const struct iovec *iov,
25992599
ssize_t err;
26002600

26012601
err = generic_write_sync(file, iocb->ki_pos - rc, rc);
2602-
if (rc < 0)
2602+
if (err < 0)
26032603
rc = err;
26042604
}
26052605
} else {

0 commit comments

Comments
 (0)