All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fs/aio.c: clean code by removing unnecessary assignment
@ 2020-09-11 21:43 mateusznosek0
  0 siblings, 0 replies; only message in thread
From: mateusznosek0 @ 2020-09-11 21:43 UTC (permalink / raw)
  To: linux-aio, linux-fsdevel, linux-kernel; +Cc: Mateusz Nosek, bcrl, viro

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-11 21:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 21:43 [PATCH] fs/aio.c: clean code by removing unnecessary assignment mateusznosek0

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.