summaryrefslogtreecommitdiff
path: root/drivers/nvme
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-08-16 11:24:39 +0300
committerSagi Grimberg <sagi@grimberg.me>2016-08-16 11:42:29 +0300
commit39bbee4e549fbc358b2ef9137c4bf459abd164fb (patch)
tree1a2ec36c78db539f518dbd35629374e40992b5f5 /drivers/nvme
parente3266378bdbca82c2854fc612fa9a391eba1f173 (diff)
downloadlinux-39bbee4e549fbc358b2ef9137c4bf459abd164fb.tar.xz
nvme-rdma: initialize ret to zero to avoid returning garbage
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>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/rdma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index 8d2875b4c56d..9c69393f6d1f 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -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))