]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
nvme-fc: fix missing put reference on controller create failure
authorJames Smart <jsmart2021@gmail.com>
Mon, 5 Jun 2017 22:03:42 +0000 (15:03 -0700)
committerChristoph Hellwig <hch@lst.de>
Wed, 7 Jun 2017 09:08:53 +0000 (11:08 +0200)
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>
drivers/nvme/host/fc.c

index 2edae54688e88d88f2b54b7239b20a5ff9c14953..92964cef0f4be5795bed3e874407c74a3e3cc725 100644 (file)
@@ -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,