[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220811075638.36450-1-chunchao@nfschina.com>
Date: Thu, 11 Aug 2022 15:56:38 +0800
From: Zhang chunchao <chunchao@...china.com>
To: axboe@...nel.dk, asml.silence@...il.com
Cc: io-uring@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...china.com, Zhang chunchao <chunchao@...china.com>
Subject: [PATCH] Modify the return value ret to EOPNOTSUPP when initialized to reduce repeated assignment of errno
Remove unnecessary initialization assignments.
Signed-off-by: Zhang chunchao <chunchao@...china.com>
---
io_uring/io_uring.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index b54218da075c..8c267af06401 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -3859,14 +3859,13 @@ SYSCALL_DEFINE4(io_uring_register, unsigned int, fd, unsigned int, opcode,
void __user *, arg, unsigned int, nr_args)
{
struct io_ring_ctx *ctx;
- long ret = -EBADF;
+ long ret = -EOPNOTSUPP;
struct fd f;
f = fdget(fd);
if (!f.file)
return -EBADF;
- ret = -EOPNOTSUPP;
if (!io_is_uring_fops(f.file))
goto out_fput;
--
2.18.2
Powered by blists - more mailing lists