aboutsummaryrefslogtreecommitdiff
path: root/hw/qdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index 599382cab2..0f8b87843a 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -315,8 +315,9 @@ void qdev_connect_gpio_out(DeviceState * dev, int n, qemu_irq pin)
void qdev_set_nic_properties(DeviceState *dev, NICInfo *nd)
{
qdev_prop_set_macaddr(dev, "mac", nd->macaddr.a);
- if (nd->netdev)
+ if (nd->netdev) {
qdev_prop_set_netdev(dev, "netdev", nd->netdev);
+ }
if (nd->nvectors != DEV_NVECTORS_UNSPECIFIED &&
object_property_find(OBJECT(dev), "vectors", NULL)) {
qdev_prop_set_uint32(dev, "vectors", nd->nvectors);