mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
hw/nvme: unregister controller with subsystem at exit
Make sure the controller is unregistered from the subsystem when device is removed. Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
@@ -6523,6 +6523,10 @@ static void nvme_exit(PCIDevice *pci_dev)
|
||||
nvme_ns_cleanup(ns);
|
||||
}
|
||||
|
||||
if (n->subsys) {
|
||||
nvme_subsys_unregister_ctrl(n->subsys, n);
|
||||
}
|
||||
|
||||
g_free(n->cq);
|
||||
g_free(n->sq);
|
||||
g_free(n->aer_reqs);
|
||||
|
||||
Reference in New Issue
Block a user