public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
From: Li kunyu <kunyu-5L972MDCkn1Wk0Htik3J/w@public.gmane.org>
To: tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org,
	hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Li kunyu <kunyu-5L972MDCkn1Wk0Htik3J/w@public.gmane.org>
Subject: [PATCH] cgroup: cgroup: Remove unnecessary ‘NULL’ values from res
Date: Fri, 11 Aug 2023 09:20:44 -0000 (UTC)
Date: Sun, 13 Aug 2023 09:51:42 +0800	[thread overview]
Message-ID: <20230813015142.3095-1-kunyu@nfschina.com> (raw)

res is assigned first, so it does not need to initialize the assignment.

Signed-off-by: Li kunyu <kunyu-5L972MDCkn1Wk0Htik3J/w@public.gmane.org>
---
 kernel/cgroup/cgroup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index cdda2a147d6b..3a8802921bcb 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -1419,7 +1419,7 @@ static inline struct cgroup *__cset_cgroup_from_root(struct css_set *cset,
 static struct cgroup *
 current_cgns_cgroup_from_root(struct cgroup_root *root)
 {
-	struct cgroup *res = NULL;
+	struct cgroup *res;
 	struct css_set *cset;
 
 	lockdep_assert_held(&css_set_lock);
-- 
2.18.2


             reply	other threads:[~2023-08-11  9:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-11  9:20 Li kunyu [this message]
2023-08-12  5:43 ` [PATCH] cgroup: cgroup: Remove unnecessary ‘NULL’ values from res kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230813015142.3095-1-kunyu@nfschina.com \
    --to=kunyu-5l972mdckn1wk0htik3j/w@public.gmane.org \
    --cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lizefan.x-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org \
    --cc=tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox