nvme-rdma: initialize ret to zero to avoid returning garbage
authorColin Ian King <colin.king@canonical.com>
Tue, 16 Aug 2016 08:24:39 +0000 (09:24 +0100)
committerSagi Grimberg <sagi@grimberg.me>
Tue, 16 Aug 2016 08:42:29 +0000 (11:42 +0300)
ret is not initialized so it contains garbage.  Ensure garbage
is not returned by initializing rc to 0.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/host/rdma.c

index 8d2875b..9c69393 100644 (file)
@@ -1319,7 +1319,7 @@ out_destroy_queue_ib:
 static int nvme_rdma_device_unplug(struct nvme_rdma_queue *queue)
 {
        struct nvme_rdma_ctrl *ctrl = queue->ctrl;
-       int ret;
+       int ret = 0;
 
        /* Own the controller deletion */
        if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_DELETING))