From: Al Viro Date: Sun, 14 Apr 2013 21:22:17 +0000 (-0400) Subject: sock_close() couldn't have been called with NULL inode since at least 2.1.early X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0e2bcaae836e535236244bfc900626ee541eb7bb;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git sock_close() couldn't have been called with NULL inode since at least 2.1.early ... if not since 0.99 or so. Signed-off-by: Al Viro --- diff --git a/net/socket.c b/net/socket.c index 88f759adf3af..9663df63e3d1 100644 --- a/net/socket.c +++ b/net/socket.c @@ -1173,15 +1173,6 @@ static int sock_mmap(struct file *file, struct vm_area_struct *vma) static int sock_close(struct inode *inode, struct file *filp) { - /* - * It was possible the inode is NULL we were - * closing an unfinished socket. - */ - - if (!inode) { - printk(KERN_DEBUG "sock_close: NULL inode\n"); - return 0; - } sock_release(SOCKET_I(inode)); return 0; }