Skip to content

Commit

Permalink
nvme-rdma: initialize ret to zero to avoid returning garbage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and Sagi Grimberg committed Aug 16, 2016
1 parent e326637 commit 39bbee4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/host/rdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue)
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))
Expand Down

0 comments on commit 39bbee4

Please sign in to comment.