Skip to content

Commit 514a6dc

Browse files
James SmartChristoph Hellwig
authored andcommitted
nvme-fc: fix error loop in create_hw_io_queues
The loop that backs out of hw io queue creation continues through index 0, which corresponds to the admin queue as well. Fix the loop so it only proceeds through indexes 1..n which correspond to I/O queues. Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de>
1 parent 52793d6 commit 514a6dc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • drivers/nvme/host

drivers/nvme/host/fc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ nvme_fc_create_hw_io_queues(struct nvme_fc_ctrl *ctrl, u16 qsize)
23172317
return 0;
23182318

23192319
delete_queues:
2320-
for (; i >= 0; i--)
2320+
for (; i > 0; i--)
23212321
__nvme_fc_delete_hw_queue(ctrl, &ctrl->queues[i], i);
23222322
return ret;
23232323
}
@@ -2436,7 +2436,7 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)
24362436
return;
24372437

24382438
dev_warn(ctrl->ctrl.device,
2439-
"NVME-FC{%d}: transport association error detected: %s\n",
2439+
"NVME-FC{%d}: transport association event: %s\n",
24402440
ctrl->cnum, errmsg);
24412441
dev_warn(ctrl->ctrl.device,
24422442
"NVME-FC{%d}: resetting controller\n", ctrl->cnum);

0 commit comments

Comments
 (0)