From: Colin Ian King Date: Tue, 16 Aug 2016 08:24:39 +0000 (+0100) Subject: nvme-rdma: initialize ret to zero to avoid returning garbage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39bbee4e549fbc358b2ef9137c4bf459abd164fb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Sagi Grimberg --- 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))