Skip to contentSkip to conversation

hw/arm/sbsa-ref: Simplify init since PCIe is always enabled

PATCH Applied Marcin Juszkiewicz 3 participants 3 messages Feb 15, 2024 – Feb 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/arm/sbsa-ref: Simplify init since PCIe is always enabled

There is no point in checking do we have PCIe if first thing after check is adding PCIe card without checking.

---
 hw/arm/sbsa-ref.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
hw/arm/sbsa-ref.c +2 -3
index f2adf30337..b7d6ba2351 100644
@@ -672,9 +672,8 @@ static void create_pcie(SBSAMachineState *sms)
     }
 
     pci = PCI_HOST_BRIDGE(dev);
-    if (pci->bus) {
-        pci_init_nic_devices(pci->bus, mc->default_nic);
-    }
+
+    pci_init_nic_devices(pci->bus, mc->default_nic);
 
     pci_create_simple(pci->bus, -1, "bochs-display");
 
Signature · 1 line
2.43.0