diff options
author | James Smart <jsmart2021@gmail.com> | 2017-11-29 15:11:37 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-03 10:24:22 +0100 |
commit | a1aef5ce2abef719d1881bd22e0e875cca8f7b6f (patch) | |
tree | 01e715761946a52dde7d174bbc427a52e5b9bad9 /drivers/nvme | |
parent | 4d9f6272917815f5ac5821ab6163045e74903f0d (diff) |
nvme-fc: remove double put reference if admin connect fails
[ Upstream commit 4596e752db02d47038cd7c965419789ab15d1985 ]
There are two put references in the failure case of initial
create_association. The first put actually frees the controller, thus the
second put references freed memory.
Remove the unnecessary 2nd put.
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/fc.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/nvme/host/fc.c b/drivers/nvme/host/fc.c index 3148d760d825..7deb7b5d8683 100644 --- a/drivers/nvme/host/fc.c +++ b/drivers/nvme/host/fc.c @@ -2876,7 +2876,6 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, /* initiate nvme ctrl ref counting teardown */ nvme_uninit_ctrl(&ctrl->ctrl); - nvme_put_ctrl(&ctrl->ctrl); /* Remove core ctrl ref. */ nvme_put_ctrl(&ctrl->ctrl); |