aboutsummaryrefslogtreecommitdiff
path: root/hw/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/pci.c')
-rw-r--r--hw/pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/pci.c b/hw/pci.c
index 49651d09f0..abf07cabd0 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -857,8 +857,8 @@ PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
pci_dev = pci_create(bus, devfn, pci_nic_names[i]);
dev = &pci_dev->qdev;
- if (nd->id)
- dev->id = qemu_strdup(nd->id);
+ if (nd->name)
+ dev->id = qemu_strdup(nd->name);
dev->nd = nd;
if (qdev_init(dev) < 0)
return NULL;