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
/
e1000.c
diff --git
a/hw/e1000.c
b/hw/e1000.c
index
1729db2
..
b0fe917
100644
(file)
--- a/
hw/e1000.c
+++ b/
hw/e1000.c
@@
-1063,6
+1063,9
@@
pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn)
d = (E1000State *)pci_register_device(bus, "e1000",
sizeof(E1000State), devfn, NULL, NULL);
+ if (!d)
+ return NULL;
+
pci_conf = d->dev.config;
memset(pci_conf, 0, 256);