nvme-pci: fixing memory leak in probe teardown path

[ Upstream commit a61d265533 ]

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: Irvin Cote <irvincoteg@gmail.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Irvin Cote 2023-03-08 18:05:08 -03:00 • committed by Greg Kroah-Hartman
commit 78f431e257