summaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c
index 015630d2e..5691718c9 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -855,7 +855,7 @@ int sock_create(int family, int type, int protocol, struct socket **res)
net_family_read_lock();
if (net_families[family] == NULL) {
- i = -EINVAL;
+ i = -EAFNOSUPPORT;
goto out;
}
@@ -1710,10 +1710,9 @@ void __init sock_init(void)
* Initialize the protocols module.
*/
- proto_init();
-
register_filesystem(&sock_fs_type);
sock_mnt = kern_mount(&sock_fs_type);
+ proto_init();
/*
* The netlink device handler may be needed early.