diff options
-rw-r--r-- | net/9p/trans_virtio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index b1d39cabf125..6753ee9326b8 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -782,10 +782,16 @@ static struct p9_trans_module p9_virtio_trans = { | |||
782 | /* The standard init function */ | 782 | /* The standard init function */ |
783 | static int __init p9_virtio_init(void) | 783 | static int __init p9_virtio_init(void) |
784 | { | 784 | { |
785 | int rc; | ||
786 | |||
785 | INIT_LIST_HEAD(&virtio_chan_list); | 787 | INIT_LIST_HEAD(&virtio_chan_list); |
786 | 788 | ||
787 | v9fs_register_trans(&p9_virtio_trans); | 789 | v9fs_register_trans(&p9_virtio_trans); |
788 | 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; | ||
789 | } | 795 | } |
790 | 796 | ||
791 | static void __exit p9_virtio_cleanup(void) | 797 | static void __exit p9_virtio_cleanup(void) |