io_uring: remove redundant initialization of variable ret
authorColin Ian King <colin.king@canonical.com>
Wed, 10 Feb 2021 20:00:07 +0000 (20:00 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Feb 2021 20:28:41 +0000 (13:28 -0700)
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>
fs/io_uring.c

index 9ed79509f3898fed9607afb9970b5a63dd298590..f730af32c17ab9e9de6f4367e6ebe252e88c5a1c 100644 (file)
@@ -2796,7 +2796,7 @@ static void io_complete_rw_common(struct kiocb *kiocb, long res,
 static bool io_resubmit_prep(struct io_kiocb *req)
 {
        struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
-       int rw, ret = -ECANCELED;
+       int rw, ret;
        struct iov_iter iter;
 
        /* already prepared */