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 <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250228235916.670437-4-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Caleb Sander Mateos
2025-02-28 16:59:13 -07:00
committed by Jens Axboe
parent 13f7f9686e
commit 6e5d321a08

View File

@@ -837,8 +837,7 @@ static struct io_rsrc_node *io_sqe_buffer_register(struct io_ring_ctx *ctx,
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);