Skip to contentSkip to conversation

proc: remove initialization assignment

PATCH In review Li zeming 2 participants 2 messages Aug 1, 2022 – Sep 8, 2022

Subsystems (3)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 proc: remove initialization assignment

The allocation address of the core_parent pointer variable is first executed in the function, no initialization assignment is required.

---
 fs/proc/proc_sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/proc/proc_sysctl.c +1 -1
index 021e83fe831f..50ba9e4fb284 100644
@@ -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;
 
Signature · 1 line
2.18.2
#1 lore raw
Quoted 4 lines · Li zeming

The allocation address of the core_parent pointer variable is first executed in the function, no initialization assignment is required.

Thanks!

Queued up for sysctl-testing, if that comes back without issues, I'll move it to sysctl-next.

Luis