[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-aio
Subject: [PATCH] fs/aio.c: clean code by removing unnecessary assignment
From: mateusznosek0 () gmail ! com
Date: 2020-09-11 21:43:35
Message-ID: 20200911214335.18794-1-mateusznosek0 () gmail ! com
[Download RAW message or body]
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
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic