nvme: Free ctrl device name on init failure
authorKeith Busch <keith.busch@intel.com>
Mon, 26 Nov 2018 23:39:47 +0000 (16:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Dec 2019 07:51:53 +0000 (08:51 +0100)
commit0e6ec8b39105ef5f63a9af25a60fc2f7d2a682a2
tree0119b9aab44d32936235f073a5f54c5438560417
parenta4d121d90e28daf1619781ee1eb098705a474ec9
nvme: Free ctrl device name on init failure

[ Upstream commit d6a2b9535d1e52bea269c138614c4801469d10e1 ]

Free the kobject name that was allocated for the controller device on
failure rather than its parent.

Fixes: d22524a4782a9 ("nvme: switch controller refcounting to use struct device")
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c