summaryrefslogtreecommitdiff
path: root/hw/ne2000.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ne2000.c')
-rw-r--r--hw/ne2000.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/ne2000.c b/hw/ne2000.c
index 3f308d4fcd..975951755d 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -810,6 +810,9 @@ PCIDevice *pci_ne2000_init(PCIBus *bus, NICInfo *nd, int devfn)
"NE2000", sizeof(PCINE2000State),
devfn,
NULL, NULL);
+ if (!d)
+ return NULL;
+
pci_conf = d->dev.config;
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_REALTEK);
pci_config_set_device_id(pci_conf, PCI_DEVICE_ID_REALTEK_RTL8029);