* [PATCH] io_uring: fix uninitialized error code in io_eventfd_register()
@ 2022-02-08 7:41 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2022-02-08 7:41 UTC (permalink / raw)
To: Jens Axboe, Usama Arif; +Cc: Pavel Begunkov, io-uring, kernel-janitors
The "ret" variable isn't initialized. We should just return 0.
Fixes: b77e315a9644 ("io_uring: avoid ring quiesce while registering/unregistering eventfd")
Signed-off-by: Dan Carpenter <[email protected]>
---
fs/io_uring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index aadabb31d6da..74afb96af214 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -9393,7 +9393,7 @@ static int io_eventfd_register(struct io_ring_ctx *ctx, void __user *arg,
ev_fd->eventfd_async = eventfd_async;
rcu_assign_pointer(ctx->io_ev_fd, ev_fd);
- return ret;
+ return 0;
}
static void io_eventfd_put(struct rcu_head *rcu)
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-02-08 7:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 7:41 [PATCH] io_uring: fix uninitialized error code in io_eventfd_register() Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox