Skip to content

Commit

Permalink
cif: fix dead code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Opdenacker authored and Steve French committed Apr 17, 2014
1 parent bae9f74 commit 1f80c0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/cifs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1f80c0c

Please sign in to comment.