Commit a61d2655 authored by Irvin Cote's avatar Irvin Cote Committed by Christoph Hellwig

nvme-pci: fixing memory leak in probe teardown path

In case the nvme_probe teardown path is triggered the ctrl ref count does
not reach 0 thus creating a memory leak upon failure of nvme_probe.
Signed-off-by: default avatarIrvin Cote <irvincoteg@gmail.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 37f0dc2e
......@@ -3073,6 +3073,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
nvme_dev_unmap(dev);
out_uninit_ctrl:
nvme_uninit_ctrl(&dev->ctrl);
nvme_put_ctrl(&dev->ctrl);
return result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment