[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230813015142.3095-1-kunyu@nfschina.com>
Date: Sun, 13 Aug 2023 09:51:42 +0800
From: Li kunyu <kunyu@...china.com>
To: tj@...nel.org, lizefan.x@...edance.com, hannes@...xchg.org
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
Li kunyu <kunyu@...china.com>
Subject: [PATCH] cgroup: cgroup: Remove unnecessary ‘NULL’ values from res
res is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li kunyu <kunyu@...china.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
Powered by blists - more mailing lists