aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c
index 2ca51c719ef9..f4a8c5a0b8d7 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -370,11 +370,11 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname)
370 370
371 file = alloc_file(&path, FMODE_READ | FMODE_WRITE, 371 file = alloc_file(&path, FMODE_READ | FMODE_WRITE,
372 &socket_file_ops); 372 &socket_file_ops);
373 if (unlikely(!file)) { 373 if (unlikely(IS_ERR(file))) {
374 /* drop dentry, keep inode */ 374 /* drop dentry, keep inode */
375 ihold(path.dentry->d_inode); 375 ihold(path.dentry->d_inode);
376 path_put(&path); 376 path_put(&path);
377 return ERR_PTR(-ENFILE); 377 return file;
378 } 378 }
379 379
380 sock->file = file; 380 sock->file = file;