]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
proc: remove initialization assignment
authorLi zeming <zeming@nfschina.com>
Mon, 1 Aug 2022 08:51:17 +0000 (16:51 +0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Thu, 8 Sep 2022 23:39:36 +0000 (16:39 -0700)
The allocation address of the core_parent pointer variable is first
executed in the function, no initialization assignment is required.

Signed-off-by: Li zeming <zeming@nfschina.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
fs/proc/proc_sysctl.c

index 021e83fe831f7cc3b90c75b5bc91b0f4e1ea9d9d..50ba9e4fb2848eb4e3801a0fb997742ee64d1a5a 100644 (file)
@@ -1246,7 +1246,7 @@ static bool get_links(struct ctl_dir *dir,
 static int insert_links(struct ctl_table_header *head)
 {
        struct ctl_table_set *root_set = &sysctl_table_root.default_set;
-       struct ctl_dir *core_parent = NULL;
+       struct ctl_dir *core_parent;
        struct ctl_table_header *links;
        int err;