Skip to content

Commit 39bbee4

Browse files
Colin Ian Kingsagigrimberg
authored andcommitted
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 <[email protected]> Signed-off-by: Sagi Grimberg <[email protected]>
1 parent e326637 commit 39bbee4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1319,7 +1319,7 @@ static int nvme_rdma_route_resolved(struct nvme_rdma_queue *queue)
13191319
static int nvme_rdma_device_unplug(struct nvme_rdma_queue *queue)
13201320
{
13211321
struct nvme_rdma_ctrl *ctrl = queue->ctrl;
1322-
int ret;
1322+
int ret = 0;
13231323

13241324
/* Own the controller deletion */
13251325
if (!nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_DELETING))

0 commit comments

Comments
 (0)