summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2017-06-06 00:03:42 +0200
committerChristoph Hellwig <hch@lst.de>2017-06-07 11:08:53 +0200
commit24b7f0592f738a1127c72dbf5b72a83997dd6997 (patch)
treefe30ce180689a7c2c91334e5fc801017f7188f74 /drivers
parentnvme-fc: on lldd/transport io error, terminate association (diff)
downloadlinux-24b7f0592f738a1127c72dbf5b72a83997dd6997.tar.xz
linux-24b7f0592f738a1127c72dbf5b72a83997dd6997.zip
nvme-fc: fix missing put reference on controller create failure
The failure case, of a create controller request, called nvme_uninit_ctrl() but didn't do a put to allow the nvme controller to be deleted. Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/fc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c
index 2edae54688e8..92964cef0f4b 100644
--- a/drivers/nvme/host/fc.c
+++ b/drivers/nvme/host/fc.c
@@ -2806,6 +2806,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
ctrl->ctrl.opts = NULL;
/* initiate nvme ctrl ref counting teardown */
nvme_uninit_ctrl(&ctrl->ctrl);
+ nvme_put_ctrl(&ctrl->ctrl);
/* as we're past the point where we transition to the ref
* counting teardown path, if we return a bad pointer here,