Skip to contentSkip to conversation

io_uring: remove dead non-zero 'poll' check

PATCH New Jens Axboe 1 participant 1 message Jul 9, 2021

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author maintainer
#0 lore raw

PATCH 1/1 io_uring: remove dead non-zero 'poll' check

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.

---

fs/io_uring.c +1 -1
index 7167c61c6d1b..d94fb5835a20 100644
@@ -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);
Signature · 1 line
Jens Axboe