From: Caleb Sander Mateos Date: Fri, 28 Feb 2025 23:59:13 +0000 (-0700) Subject: io_uring/rsrc: avoid NULL node check on io_sqe_buffer_register() failure X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6e5d321a08e30f746d63fc56e7ea5c46b06fbe99;p=users%2Fjedix%2Flinux-maple.git io_uring/rsrc: avoid NULL node check on io_sqe_buffer_register() failure The done: label is only reachable if node is non-NULL. So don't bother checking, just call io_free_node(). Signed-off-by: Caleb Sander Mateos Link: https://lore.kernel.org/r/20250228235916.670437-4-csander@purestorage.com Signed-off-by: Jens Axboe --- diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index 8c1717c53d67..806f2c1f5d2e 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -837,8 +837,7 @@ done: if (ret) { if (imu) io_free_imu(ctx, imu); - if (node) - io_free_node(ctx, node); + io_free_node(ctx, node); node = ERR_PTR(ret); } kvfree(pages);