From: Michael Opdenacker <michael.opdenacker@free-electrons.com>
To: sfrench@samba.org, linux-cifs@vger.kernel.org, viro@zeniv.linux.org.uk
Cc: geert@linux-m68k.org, samba-technical@lists.samba.org,
linux-kernel@vger.kernel.org,
Michael Opdenacker <michael.opdenacker@free-electrons.com>
Subject: [PATCH] cif: fix dead code
Date: Tue, 15 Apr 2014 10:06:50 +0200 [thread overview]
Message-ID: <1397549210-29445-1-git-send-email-michael.opdenacker@free-electrons.com> (raw)
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>
---
fs/cifs/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 8add25538a3b..b6e78632fa97 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 {
--
1.8.3.2
next reply other threads:[~2014-04-15 8:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 8:06 Michael Opdenacker [this message]
2014-04-15 8:16 ` Al Viro
2014-04-17 4:10 ` Steve French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1397549210-29445-1-git-send-email-michael.opdenacker@free-electrons.com \
--to=michael.opdenacker@free-electrons.com \
--cc=geert@linux-m68k.org \
--cc=linux-cifs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samba-technical@lists.samba.org \
--cc=sfrench@samba.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®