res is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu <kunyu@xxxxxxxxxxxx> --- 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