Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cfa0ebc9 authored by Andrew Jones's avatar Andrew Jones Committed by Michael S. Tsirkin
Browse files

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: 8017c279 ("net/virtio-net: Convert to hotplug state machine")
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent f9aada5f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2743,9 +2743,9 @@ module_init(virtio_net_driver_init);

static __exit void virtio_net_driver_exit(void)
{
	unregister_virtio_driver(&virtio_net_driver);
	cpuhp_remove_multi_state(CPUHP_VIRT_NET_DEAD);
	cpuhp_remove_multi_state(virtionet_online);
	unregister_virtio_driver(&virtio_net_driver);
}
module_exit(virtio_net_driver_exit);