mm/secretmem: remove redundant initiialization of pointer file
authorColin Ian King <colin.i.king@gmail.com>
Mon, 16 Jan 2023 16:43:32 +0000 (16:43 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:33:21 +0000 (22:33 -0800)
The pointer file is being initialized with a value that is never read, it
is being re-assigned later on.  Clean up code by removing the redundant
initialization.

Link: https://lkml.kernel.org/r/20230116164332.79500-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foudation.org>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/secretmem.c

index 04c3ac9..be3fff8 100644 (file)
@@ -190,7 +190,7 @@ static struct vfsmount *secretmem_mnt;
 
 static struct file *secretmem_file_create(unsigned long flags)
 {
-       struct file *file = ERR_PTR(-ENOMEM);
+       struct file *file;
        struct inode *inode;
        const char *anon_name = "[secretmem]";
        const struct qstr qname = QSTR_INIT(anon_name, strlen(anon_name));