In the kfree() function, the passed argument is checked. Therefore, the conditional statement in io_free_batch_list() can be removed. Signed-off-by: Xichao Zhao --- io_uring/io_uring.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index 4ef69dd58734..7a9106066653 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1469,8 +1469,7 @@ static void io_free_batch_list(struct io_ring_ctx *ctx, if ((req->flags & REQ_F_POLLED) && req->apoll) { struct async_poll *apoll = req->apoll; - if (apoll->double_poll) - kfree(apoll->double_poll); + kfree(apoll->double_poll); io_cache_free(&ctx->apoll_cache, apoll); req->flags &= ~REQ_F_POLLED; } -- 2.34.1