Skip to contentSkip to conversation

fs/aio.c: clean code by removing unnecessary assignment

PATCH New [email protected] 1 participant 1 message Sep 11, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/aio.c: clean code by removing unnecessary assignment

From: Mateusz Nosek <[email protected]>

Variable 'ret' is reassigned before used otherwise, so the assignment is unnecessary and therefore can be removed.

---
 fs/aio.c | 1 -
 1 file changed, 1 deletion(-)
fs/aio.c +0 -1
index 42154e7c44cb..0a0e5cefa1c4 100644
@@ -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;
 
Signature · 1 line
2.20.1