diff mbox series

proc: remove initialization assignment

Message ID 20220801085117.4313-1-zeming@nfschina.com (mailing list archive)
State New, archived
Headers show
Series proc: remove initialization assignment | expand

Commit Message

Li zeming Aug. 1, 2022, 8:51 a.m. UTC
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>
---
 fs/proc/proc_sysctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luis Chamberlain Sept. 8, 2022, 11:40 p.m. UTC | #1
On Mon, Aug 01, 2022 at 04:51:17PM +0800, Li zeming wrote:
> 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>

Thanks!

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

  Luis
diff mbox series

Patch

diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 021e83fe831f..50ba9e4fb284 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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;