* [PATCH] proc/proc_sysctl: Remove unnecessary 'NULL' values from Pointer
@ 2022-09-05 1:21 Li zeming
2022-09-08 23:54 ` Luis Chamberlain
0 siblings, 1 reply; 3+ messages in thread
From: Li zeming @ 2022-09-05 1:21 UTC (permalink / raw)
To: mcgrof, keescook, yzaikin; +Cc: linux-kernel, linux-fsdevel, Li zeming
Pointer variables allocate memory first, and then judge. There is no
need to initialize the assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
fs/proc/proc_sysctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
2.18.2
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] proc/proc_sysctl: Remove unnecessary 'NULL' values from Pointer
2022-09-05 1:21 [PATCH] proc/proc_sysctl: Remove unnecessary 'NULL' values from Pointer Li zeming
@ 2022-09-08 23:54 ` Luis Chamberlain
2022-09-09 1:26 ` Li zeming
0 siblings, 1 reply; 3+ messages in thread
From: Luis Chamberlain @ 2022-09-08 23:54 UTC (permalink / raw)
To: Li zeming; +Cc: keescook, yzaikin, linux-kernel, linux-fsdevel
On Mon, Sep 05, 2022 at 09:21:10AM +0800, Li zeming wrote:
> Pointer variables allocate memory first, and then judge. There is no
> need to initialize the assignment.
>
> Signed-off-by: Li zeming <zeming@nfschina.com>
you sent the same patch before, and with a different subject...
Anyway the first one was queued up already, in the future please
use a bit better subject.
Luis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-09 1:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-05 1:21 [PATCH] proc/proc_sysctl: Remove unnecessary 'NULL' values from Pointer Li zeming
2022-09-08 23:54 ` Luis Chamberlain
2022-09-09 1:26 ` Li zeming
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®