summary refs log tree commit diff stats
path: root/hw/device-hotplug.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/device-hotplug.c')
-rw-r--r--hw/device-hotplug.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index 3bdc048c68..e178083419 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -55,12 +55,7 @@ void destroy_nic(dev_match_fn *match_fn, void *arg)
         nic = &nd_table[i];
         if (nic->used) {
             if (nic->private && match_fn(nic->private, arg)) {
-                if (nic->vlan) {
-                    VLANClientState *vc;
-                    vc = qemu_find_vlan_client(nic->vlan, nic->private);
-                    if (vc)
-                        qemu_del_vlan_client(vc);
-                }
+                qemu_del_vlan_client(nic->vc);
                 net_client_uninit(nic);
             }
         }