diff options
author | Caleb Sander Mateos <csander@purestorage.com> | 2025-02-28 16:59:13 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-03-04 07:17:15 -0700 |
commit | 6e5d321a08e30f746d63fc56e7ea5c46b06fbe99 (patch) | |
tree | 7b57e345d9d30266d8ce29f41a9782f4e16ef537 /io_uring | |
parent | 13f7f9686e928dae352972a1a95b50b2d5e80d42 (diff) |
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>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/rsrc.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |