mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] cgroup: cgroup: Remove unnecessary ‘NULL’ values from res
@ 2023-08-13  1:51 Li kunyu
  2023-08-12  5:43 ` kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Li kunyu @ 2023-08-13  1:51 UTC (permalink / raw)
  To: tj, lizefan.x, hannes; +Cc: cgroups, linux-kernel, Li kunyu

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

Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-08-12  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-13  1:51 [PATCH] cgroup: cgroup: Remove unnecessary ‘NULL’ values from res Li kunyu
2023-08-12  5:43 ` kernel test robot

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®