From: Zhang chunchao <[email protected]>
To: [email protected], [email protected]
Cc: [email protected], [email protected],
[email protected], Zhang chunchao <[email protected]>
Subject: [PATCH] Modify the return value ret to EOPNOTSUPP when initialized to reduce repeated assignment of errno
Date: Thu, 11 Aug 2022 15:56:38 +0800 [thread overview]
Message-ID: <[email protected]> (raw)
Remove unnecessary initialization assignments.
Signed-off-by: Zhang chunchao <[email protected]>
---
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
next reply other threads:[~2022-08-11 7:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-11 7:56 Zhang chunchao [this message]
2022-08-11 15:02 ` [PATCH] Modify the return value ret to EOPNOTSUPP when initialized to reduce repeated assignment of errno Stefano Garzarella
2022-08-11 15:41 ` Jens Axboe
2022-08-11 18:42 ` Stefano Garzarella
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox