virtio-net: fix module unloading
authorAndrew Jones <drjones@redhat.com>
Mon, 24 Jul 2017 13:38:32 +0000 (15:38 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 25 Jul 2017 13:37:36 +0000 (16:37 +0300)
commitcfa0ebc9d6d6308564f5174ecb655b9d504b2be5
tree910ffe5323fd35fa7f58b24ec19fff5ea888a651
parentf9aada5fff212913372410ae45c18c7c3cade67a
virtio-net: fix module unloading

Unregister the driver before removing multi-instance hotplug
callbacks. This order avoids the warning issued from
__cpuhp_remove_state_cpuslocked when the number of remaining
instances isn't yet zero.

Fixes: 8017c279196a ("net/virtio-net: Convert to hotplug state machine")
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/net/virtio_net.c