From: Colin King <[email protected]>
To: Jens Axboe <[email protected]>,
Alexander Viro <[email protected]>,
[email protected], [email protected]
Cc: [email protected], [email protected]
Subject: [PATCH][next] io_uring: fix return of an uninitialized variable ret
Date: Tue, 11 Feb 2020 16:02:59 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
From: Colin Ian King <[email protected]>
Currently variable ret is not initialized and this value is being
returned at the end of the function io_poll_double_wake. Since
ret is not being used anywhere else remove it and just return 0.
Addresses-Coverity: ("Uninitialized scalar variable")
Fixes: f6e84af0767f ("io_uring: allow POLL_ADD with double poll_wait() users")
Signed-off-by: Colin Ian King <[email protected]>
---
fs/io_uring.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 72bc378edebc..5c6a899b51d8 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3707,7 +3707,6 @@ static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,
struct io_poll_iocb *poll = (void *) req->io;
__poll_t mask = key_to_poll(key);
bool done = true;
- int ret;
/* for instances that support it check for an event match first: */
if (mask && !(mask & poll->events))
@@ -3725,7 +3724,7 @@ static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,
if (!done)
__io_poll_wake(req, poll, mask);
refcount_dec(&req->refs);
- return ret;
+ return 0;
}
struct io_poll_table {
--
2.25.0
next reply other threads:[~2020-02-11 16:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-11 16:02 Colin King [this message]
2020-02-11 16:07 ` [PATCH][next] io_uring: fix return of an uninitialized variable ret Jens Axboe
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] \
[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