aio: drop needless assignment in aio_read()
authorLukas Bulwahn <lukas.bulwahn@gmail.com>
Mon, 14 Mar 2022 15:46:05 +0000 (16:46 +0100)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 15 Mar 2022 23:43:19 +0000 (19:43 -0400)
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>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/aio.c

index 4ceba13a7db0f60510174c8b8d46f461ab3034ea..3b7cdcc2a02e074e7ed656caf8a9ca66b64a6acf 100644 (file)
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1553,7 +1553,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;