aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c
index 0ee74c325320..815bba3d2fe0 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2390,6 +2390,8 @@ EXPORT_SYMBOL(sock_unregister);
2390 2390
2391static int __init sock_init(void) 2391static int __init sock_init(void)
2392{ 2392{
2393 int err;
2394
2393 /* 2395 /*
2394 * Initialize sock SLAB cache. 2396 * Initialize sock SLAB cache.
2395 */ 2397 */
@@ -2406,8 +2408,15 @@ static int __init sock_init(void)
2406 */ 2408 */
2407 2409
2408 init_inodecache(); 2410 init_inodecache();
2409 register_filesystem(&sock_fs_type); 2411
2412 err = register_filesystem(&sock_fs_type);
2413 if (err)
2414 goto out_fs;
2410 sock_mnt = kern_mount(&sock_fs_type); 2415 sock_mnt = kern_mount(&sock_fs_type);
2416 if (IS_ERR(sock_mnt)) {
2417 err = PTR_ERR(sock_mnt);
2418 goto out_mount;
2419 }
2411 2420
2412 /* The real protocol initialization is performed in later initcalls. 2421 /* The real protocol initialization is performed in later initcalls.
2413 */ 2422 */
@@ -2420,7 +2429,13 @@ static int __init sock_init(void)
2420 skb_timestamping_init(); 2429 skb_timestamping_init();
2421#endif 2430#endif
2422 2431
2423 return 0; 2432out:
2433 return err;
2434
2435out_mount:
2436 unregister_filesystem(&sock_fs_type);
2437out_fs:
2438 goto out;
2424} 2439}
2425 2440
2426core_initcall(sock_init); /* early initcall */ 2441core_initcall(sock_init); /* early initcall */