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>
pull/1188/head
Caleb Sander Mateos 2025-02-28 16:59:13 -07:00 committed by Jens Axboe
parent 13f7f9686e
commit 6e5d321a08
1 changed files with 1 additions and 2 deletions

View File

@ -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);