net/9p/trans_virtio.c: kmalloc() enough memory
[sfrench/cifs-2.6.git] / net / 9p / mod.c
index 41d70f47375ddd5d825268b76ad7629bac368ef6..c285aab2af04ba78683e98f45175815f1aadbbab 100644 (file)
@@ -76,9 +76,9 @@ struct p9_trans_module *v9fs_match_trans(const substring_t *name)
        list_for_each(p, &v9fs_trans_list) {
                t = list_entry(p, struct p9_trans_module, list);
                if (strncmp(t->name, name->from, name->to-name->from) == 0)
-                       break;
+                       return t;
        }
-       return t;
+       return NULL;
 }
 EXPORT_SYMBOL(v9fs_match_trans);
 
@@ -106,15 +106,10 @@ EXPORT_SYMBOL(v9fs_default_trans);
  */
 static int __init init_p9(void)
 {
-       int ret;
+       int ret = 0;
 
        p9_error_init();
        printk(KERN_INFO "Installing 9P2000 support\n");
-       ret = p9_mux_global_init();
-       if (ret) {
-               printk(KERN_WARNING "9p: starting mux failed\n");
-               return ret;
-       }
 
        return ret;
 }
@@ -126,7 +121,7 @@ static int __init init_p9(void)
 
 static void __exit exit_p9(void)
 {
-       p9_mux_global_exit();
+       printk(KERN_INFO "Unloading 9P2000 support\n");
 }
 
 module_init(init_p9)