diff mbox series

[PULL,09/47] hw/arm/virt: use pci_init_nic_devices()

Message ID 20240201164412.785520-10-dwmw2@infradead.org
State New
Headers show
Series [PULL,01/47] net: add qemu_{configure, create}_nic_device(), qemu_find_nic_info() | expand

Commit Message

David Woodhouse Feb. 1, 2024, 4:43 p.m. UTC
From: David Woodhouse <dwmw@amazon.co.uk>

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
 hw/arm/virt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index e6ead2c5c8..368c2a415a 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -1457,9 +1457,7 @@  static void create_pcie(VirtMachineState *vms)
     pci->bypass_iommu = vms->default_bus_bypass_iommu;
     vms->bus = pci->bus;
     if (vms->bus) {
-        for (i = 0; i < nb_nics; i++) {
-            pci_nic_init_nofail(&nd_table[i], pci->bus, mc->default_nic, NULL);
-        }
+        pci_init_nic_devices(pci->bus, mc->default_nic);
     }
 
     nodename = vms->pciehb_nodename = g_strdup_printf("/pcie@%" PRIx64, base);