From: Akihiko Odaki Date: Thu, 16 Jan 2025 09:00:57 +0000 (+0900) Subject: pcie_sriov: Do not manually unrealize X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e8b827ce7c4bf9a334c46282779f234d1a011cd1;p=qemu.git pcie_sriov: Do not manually unrealize A device gets automatically unrealized when being unparented. Signed-off-by: Akihiko Odaki Message-Id: <20250116-reuse-v20-6-7cb370606368@daynix.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Philippe Mathieu-Daudé --- diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c index e9b23221d7..499becd527 100644 --- a/hw/pci/pcie_sriov.c +++ b/hw/pci/pcie_sriov.c @@ -204,11 +204,7 @@ static void unregister_vfs(PCIDevice *dev) trace_sriov_unregister_vfs(dev->name, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), num_vfs); for (i = 0; i < num_vfs; i++) { - Error *err = NULL; PCIDevice *vf = dev->exp.sriov_pf.vf[i]; - if (!object_property_set_bool(OBJECT(vf), "realized", false, &err)) { - error_reportf_err(err, "Failed to unplug: "); - } object_unparent(OBJECT(vf)); object_unref(OBJECT(vf)); }