summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/fc.c
diff options
context:
space:
mode:
authorChaitanya Kulkarni <kch@nvidia.com>2022-02-10 11:12:36 -0800
committerChristoph Hellwig <hch@lst.de>2022-02-28 13:45:06 +0200
commit72e8b5cd7dd387ba3eee81b0a59746ad8ccdcb5f (patch)
tree1d141e599fc6dbd614303baef1c489cc4d22f683 /drivers/nvme/host/fc.c
parent4686af885a9168f9ec70c4063616640911c48b03 (diff)
downloadlinux-72e8b5cd7dd387ba3eee81b0a59746ad8ccdcb5f.tar.bz2
nvme: add a helper to initialize connect_q
Add and use helper to remove duplicate code for fabrics connect_q initialization and error handling for all the transports. Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/fc.c')
-rw-r--r--drivers/nvme/host/fc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 96a5d7fc36f7..080f85f4105f 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2916,11 +2916,9 @@ nvme_fc_create_io_queues(struct nvme_fc_ctrl *ctrl)
ctrl->ctrl.tagset = &ctrl->tag_set;
- ctrl->ctrl.connect_q = blk_mq_init_queue(&ctrl->tag_set);
- if (IS_ERR(ctrl->ctrl.connect_q)) {
- ret = PTR_ERR(ctrl->ctrl.connect_q);
+ ret = nvme_ctrl_init_connect_q(&(ctrl->ctrl));
+ if (ret)
goto out_free_tag_set;
- }
ret = nvme_fc_create_hw_io_queues(ctrl, ctrl->ctrl.sqsize + 1);
if (ret)