We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70a6ceb commit 4d96a2aCopy full SHA for 4d96a2a
net/9p/trans_virtio.c
@@ -764,10 +764,16 @@ static struct p9_trans_module p9_virtio_trans = {
764
/* The standard init function */
765
static int __init p9_virtio_init(void)
766
{
767
+ int rc;
768
+
769
INIT_LIST_HEAD(&virtio_chan_list);
770
771
v9fs_register_trans(&p9_virtio_trans);
- return register_virtio_driver(&p9_virtio_drv);
772
+ rc = register_virtio_driver(&p9_virtio_drv);
773
+ if (rc)
774
+ v9fs_unregister_trans(&p9_virtio_trans);
775
776
+ return rc;
777
}
778
779
static void __exit p9_virtio_cleanup(void)
0 commit comments