aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/pci/pci.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 6941a82..b3d5100 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -1660,7 +1660,9 @@ PCIDevice *pci_nic_init_nofail(NICInfo *nd, PCIBus *rootbus,
res = pci_nic_init(nd, rootbus, default_model, default_devaddr, &err);
if (!res) {
- error_report_err(err);
+ if (err) {
+ error_report_err(err);
+ }
exit(1);
}
return res;