* [PATCH] io_uring: remove dead non-zero 'poll' check
@ 2021-07-09 14:24 Jens Axboe
0 siblings, 0 replies; only message in thread
From: Jens Axboe @ 2021-07-09 14:24 UTC (permalink / raw)
To: io-uring; +Cc: Colin King
Colin reports that Coverity complains about checking for poll being
non-zero after having dereferenced it multiple times. This is a valid
complaint, and actually a leftover from back when this code was based
on the aio poll code.
Kill the redundant check.
Link: https://lore.kernel.org/io-uring/[email protected]/
Reported-by: Colin Ian King <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
---
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7167c61c6d1b..d94fb5835a20 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -4956,7 +4956,7 @@ static int io_poll_double_wake(struct wait_queue_entry *wait, unsigned mode,
list_del_init(&wait->entry);
- if (poll && poll->head) {
+ if (poll->head) {
bool done;
spin_lock(&poll->head->lock);
--
Jens Axboe
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-09 14:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-09 14:24 [PATCH] io_uring: remove dead non-zero 'poll' check Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox