From: mateusznosek0@gmail.com
To: linux-aio@kvack.org, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Mateusz Nosek <mateusznosek0@gmail.com>,
bcrl@kvack.org, viro@zeniv.linux.org.uk
Subject: [PATCH] fs/aio.c: clean code by removing unnecessary assignment
Date: Fri, 11 Sep 2020 23:43:35 +0200 [thread overview]
Message-ID: <20200911214335.18794-1-mateusznosek0@gmail.com> (raw)
From: Mateusz Nosek <mateusznosek0@gmail.com>
Variable 'ret' is reassigned before used otherwise, so the assignment is
unnecessary and therefore can be removed.
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
---
fs/aio.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/aio.c b/fs/aio.c
index 42154e7c44cb..0a0e5cefa1c4 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1528,7 +1528,6 @@ static int aio_read(struct kiocb *req, const struct iocb *iocb,
file = req->ki_filp;
if (unlikely(!(file->f_mode & FMODE_READ)))
return -EBADF;
- ret = -EINVAL;
if (unlikely(!file->f_op->read_iter))
return -EINVAL;
--
2.20.1
reply other threads:[~2020-09-11 21:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200911214335.18794-1-mateusznosek0@gmail.com \
--to=mateusznosek0@gmail.com \
--cc=bcrl@kvack.org \
--cc=linux-aio@kvack.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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®