All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] aio: drop needless assignment in aio_read()
@ 2022-03-14 15:46 Lukas Bulwahn
  2022-03-14 18:21 ` Linus Torvalds
  2022-03-15 22:00 ` Al Viro
  0 siblings, 2 replies; 3+ messages in thread
From: Lukas Bulwahn @ 2022-03-14 15:46 UTC (permalink / raw)
  To: Benjamin LaHaise, Alexander Viro, linux-aio, linux-fsdevel
  Cc: Linus Torvalds, kernel-janitors, linux-kernel, Lukas Bulwahn

Commit 84c4e1f89fef ("aio: simplify - and fix - fget/fput for io_submit()")
refactored aio_read() and some error cases into early return, which made
some intermediate assignment of the return variable needless.

Drop this needless assignment in aio_read().

No functional change. No change in resulting object code.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
I cc'ed Linus as he is the author of the referred commit, but I expect
that this clean-up just goes the usual way to Al Viro and then in some
git pull to Linus.

 fs/aio.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/aio.c b/fs/aio.c
index eb0948bb74f1..7b761d9d774a 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1552,7 +1552,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.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-15 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 15:46 [PATCH] aio: drop needless assignment in aio_read() Lukas Bulwahn
2022-03-14 18:21 ` Linus Torvalds
2022-03-15 22:00 ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.