Skip to content

Commit 83956c8

Browse files
Nghia Leaxboe
authored andcommitted
io_uring: remove redundant assignment to ret in io_register_iowq_max_workers()
After the assignment, only exit path with label 'err' uses ret as return value. However,before exiting through this path with label 'err', ret is assigned with the return value of io_wq_max_workers(). Hence, the initial assignment is redundant and can be removed. Signed-off-by: Nghia Le <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 71c9ce2 commit 83956c8

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

fs/io_uring.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10794,7 +10794,6 @@ static __cold int io_register_iowq_max_workers(struct io_ring_ctx *ctx,
1079410794
memcpy(ctx->iowq_limits, new_count, sizeof(new_count));
1079510795
ctx->iowq_limits_set = true;
1079610796

10797-
ret = -EINVAL;
1079810797
if (tctx && tctx->io_wq) {
1079910798
ret = io_wq_max_workers(tctx->io_wq, new_count);
1080010799
if (ret)

0 commit comments

Comments
 (0)