nvme: remove redundant initialization of variable ret
authorColin Ian King <colin.king@canonical.com>
Thu, 13 May 2021 11:59:52 +0000 (12:59 +0100)
committerChristoph Hellwig <hch@lst.de>
Thu, 3 Jun 2021 07:29:24 +0000 (10:29 +0300)
The variable ret is being initialized with a value that is never read,
it is being updated later on. The assignment is redundant and can be
removed.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c

index 37943dc4c2c11eefacb684d20e9cfd4739d4841c..74bf2c7f2b80b7fb9859ec6fb704cfb7fe19fb9b 100644 (file)
@@ -1088,7 +1088,7 @@ static void nvme_rdma_reconnect_or_remove(struct nvme_rdma_ctrl *ctrl)
 
 static int nvme_rdma_setup_ctrl(struct nvme_rdma_ctrl *ctrl, bool new)
 {
-       int ret = -EINVAL;
+       int ret;
        bool changed;
 
        ret = nvme_rdma_configure_admin_queue(ctrl, new);