diff options
author | Mark Brown <broonie@kernel.org> | 2023-03-13 13:20:45 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-13 13:20:45 +0000 |
commit | b9d0bb8f1c2e5dce9b8a54fb77d1af4aa64a4c01 (patch) | |
tree | 1e8f106c57c2934eee422f8ee5e59e73015e2dc4 /net/socket.c | |
parent | 5bd73a162bc881dbb98ff9909dd865286852ee2b (diff) | |
parent | eeac8ede17557680855031c6f305ece2378af326 (diff) | |
download | linux-stable-b9d0bb8f1c2e5dce9b8a54fb77d1af4aa64a4c01.tar.gz linux-stable-b9d0bb8f1c2e5dce9b8a54fb77d1af4aa64a4c01.tar.bz2 linux-stable-b9d0bb8f1c2e5dce9b8a54fb77d1af4aa64a4c01.zip |
Merge tag 'v6.3-rc2' into regulator-6.4 to fix clock related boot issues
Linux 6.3-rc2
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/socket.c b/net/socket.c index 6bae8ce7059e..9c92c0e6c4da 100644 --- a/net/socket.c +++ b/net/socket.c @@ -450,7 +450,9 @@ static struct file_system_type sock_fs_type = { * * Returns the &file bound with @sock, implicitly storing it * in sock->file. If dname is %NULL, sets to "". - * On failure the return is a ERR pointer (see linux/err.h). + * + * On failure @sock is released, and an ERR pointer is returned. + * * This function uses GFP_KERNEL internally. */ @@ -1638,7 +1640,6 @@ static struct socket *__sys_socket_create(int family, int type, int protocol) struct file *__sys_socket_file(int family, int type, int protocol) { struct socket *sock; - struct file *file; int flags; sock = __sys_socket_create(family, type, protocol); @@ -1649,11 +1650,7 @@ struct file *__sys_socket_file(int family, int type, int protocol) if (SOCK_NONBLOCK != O_NONBLOCK && (flags & SOCK_NONBLOCK)) flags = (flags & ~SOCK_NONBLOCK) | O_NONBLOCK; - file = sock_alloc_file(sock, flags, NULL); - if (IS_ERR(file)) - sock_release(sock); - - return file; + return sock_alloc_file(sock, flags, NULL); } int __sys_socket(int family, int type, int protocol) |