]> Git Repo - linux.git/commitdiff
io_uring: remove dead non-zero 'poll' check
authorJens Axboe <[email protected]>
Fri, 9 Jul 2021 14:20:28 +0000 (08:20 -0600)
committerJens Axboe <[email protected]>
Fri, 9 Jul 2021 14:20:28 +0000 (08:20 -0600)
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]>
fs/io_uring.c

index 7167c61c6d1b8295ebd2cc3d61e4c75ab70525b6..d94fb5835a20e8320e0af56c9fb120425bb7e614 100644 (file)
@@ -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);
This page took 0.062203 seconds and 4 git commands to generate.