projects
/
qemu
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Pci nic: pci_register_device can fail
[qemu]
/
hw
/
ne2000.c
diff --git
a/hw/ne2000.c
b/hw/ne2000.c
index
99612e2
..
613ac41
100644
(file)
--- 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_8029);