From: Colin Ian King colin.king@canonical.com
mainline inclusion from mainline-v5.12-rc1 commit 4a245479c2312e6b51862c21af134d4191ab9cf7 category: bugfix bugzilla: 186136, https://gitee.com/openeuler/kernel/issues/I4RM1D CVE: NA
-------------------------------------------------
The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed.
Addresses-Coverity: ("Unused value") Fixes: b63534c41e20 ("io_uring: re-issue block requests that failed because of resources") Signed-off-by: Colin Ian King colin.king@canonical.com Reviewed-by: Chaitanya Kulkarni chaitanya.kulkarni@wdc.com Signed-off-by: Jens Axboe axboe@kernel.dk conflict: fs/io_uring.c Signed-off-by: Laibin Qiu qiulaibin@huawei.com Reviewed-by: Zhang Yi yi.zhang@huawei.com --- fs/io_uring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/io_uring.c b/fs/io_uring.c index aeedf191b813..4e552dfe1c64 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2374,7 +2374,7 @@ static void io_complete_rw_common(struct kiocb *kiocb, long res, static bool io_resubmit_prep(struct io_kiocb *req, int error) { struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs; - ssize_t ret = -ECANCELED; + ssize_t ret; struct iov_iter iter; int rw;