qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 11/14] pcie_sriov: Release VFs failed to realize


From: Akihiko Odaki
Subject: [PATCH 11/14] pcie_sriov: Release VFs failed to realize
Date: Sat, 02 Dec 2023 17:00:34 +0900

Release VFs failed to realize just as we do in unregister_vfs().

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
---
 hw/pci/pcie_sriov.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 5ef8950940..3ec786d341 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -153,6 +153,8 @@ static PCIDevice *register_vf(PCIDevice *pf, int devfn, 
const char *name,
     qdev_realize(&dev->qdev, &bus->qbus, &local_err);
     if (local_err) {
         error_report_err(local_err);
+        object_unparent(OBJECT(dev));
+        object_unref(dev);
         return NULL;
     }
 

-- 
2.43.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]