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 5908e6b commit d454854Copy full SHA for d454854
net/9p/trans_virtio.c
@@ -782,10 +782,16 @@ static struct p9_trans_module p9_virtio_trans = {
782
/* The standard init function */
783
static int __init p9_virtio_init(void)
784
{
785
+ int rc;
786
+
787
INIT_LIST_HEAD(&virtio_chan_list);
788
789
v9fs_register_trans(&p9_virtio_trans);
- return register_virtio_driver(&p9_virtio_drv);
790
+ rc = register_virtio_driver(&p9_virtio_drv);
791
+ if (rc)
792
+ v9fs_unregister_trans(&p9_virtio_trans);
793
794
+ return rc;
795
}
796
797
static void __exit p9_virtio_cleanup(void)
0 commit comments