Skip to contentSkip to conversation

nvme_fc: remove double put reference if admin connect fails

PATCH New James Smart 2 participants 2 messages Nov 29, 2017 – Dec 4, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme_fc: remove double put reference if admin connect fails

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 at broadcom.com>
---
 drivers/nvme/host/fc.c | 1 -
 1 file changed, 1 deletion(-)
drivers/nvme/host/fc.c +0 -1
index 0a8af4daef89..794e66e4aa20 100644
@@ -3221,7 +3221,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);
Signature · 1 line
2.13.1
#1 lore raw

PATCH 1/1 nvme_fc: remove double put reference if admin connect fails

Thanks,

applied to nvme-4.15.