Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-05-21 08:05:28 +0200
committerTakashi Iwai <tiwai@suse.de>2019-05-21 08:05:32 +0200
commit90ae359a2ba778f113fa9e9462989bcb602ecedf (patch)
tree76d6824223be34488dddf345d7b80df072f70d27
parent9fc50c72c1ee5d975cafbae93f93f23aaaa066c3 (diff)
vsock/virtio: Initialize core virtio vsock before registering
the driver (bsc#1051510). suse-commit: 71c20f2154c9a39542f618b7587a7c4bbdd92ff3
-rw-r--r--net/vmw_vsock/virtio_transport.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c
index 2ff751eba037..5ebeef8ae3fa 100644
--- a/net/vmw_vsock/virtio_transport.c
+++ b/net/vmw_vsock/virtio_transport.c
@@ -702,28 +702,27 @@ static int __init virtio_vsock_init(void)
if (!virtio_vsock_workqueue)
return -ENOMEM;
- ret = register_virtio_driver(&virtio_vsock_driver);
+ ret = vsock_core_init(&virtio_transport.transport);
if (ret)
goto out_wq;
- ret = vsock_core_init(&virtio_transport.transport);
+ ret = register_virtio_driver(&virtio_vsock_driver);
if (ret)
- goto out_vdr;
+ goto out_vci;
return 0;
-out_vdr:
- unregister_virtio_driver(&virtio_vsock_driver);
+out_vci:
+ vsock_core_exit();
out_wq:
destroy_workqueue(virtio_vsock_workqueue);
return ret;
-
}
static void __exit virtio_vsock_exit(void)
{
- vsock_core_exit();
unregister_virtio_driver(&virtio_vsock_driver);
+ vsock_core_exit();
destroy_workqueue(virtio_vsock_workqueue);
}