Skip to content

Commit 83956c8

Browse files
nghialm78-blipaxboe
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 <nghialm78@gmail.com> Link: https://lore.kernel.org/r/20211102190521.28291-1-nghialm78@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 71c9ce2 commit 83956c8

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

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)