diff options
| author | Takashi Iwai <tiwai@suse.de> | 2023-03-31 21:37:02 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2023-03-31 21:37:02 +0200 |
| commit | f43359501e2d70ba8a68f2302c1009d9194fc60d (patch) | |
| tree | 5fb84bd31e4232c3b3af397c4956ba53b613c064 /net/socket.c | |
| parent | 9fdc1605c504204e0fdec7892b29c916579e06f3 (diff) | |
| parent | e3720f92e0237921da537e47a0b24e27899203f8 (diff) | |
Merge tag 'asoc-fix-v6.3-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.3
More fixes for v6.3, plus a few new trivial device ID additions.
Almost all of this is for the Intel drivers, though there is one
core fix from Shengjiu which ensures that format constraints are
correctly applied in some cases where they were missed.
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) |
