summaryrefslogtreecommitdiff
path: root/hw/eepro100.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/eepro100.c')
-rw-r--r--hw/eepro100.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/eepro100.c b/hw/eepro100.c
index caf687a835..8eb94fd469 100644
--- a/hw/eepro100.c
+++ b/hw/eepro100.c
@@ -1764,6 +1764,9 @@ static PCIDevice *nic_init(PCIBus * bus, NICInfo * nd, uint32_t device)
d = (PCIEEPRO100State *) pci_register_device(bus, nd->model,
sizeof(PCIEEPRO100State), -1,
NULL, NULL);
+ if (!d)
+ return NULL;
+
d->dev.unregister = pci_nic_uninit;
s = &d->eepro100;