public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: fix: Uninitialized variable ret.
@ 2020-12-30  6:59 YANG LI
       [not found] ` <1609311551-97108-1-git-send-email-abaci-bugfix-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: YANG LI @ 2020-12-30  6:59 UTC (permalink / raw)
  To: hannes-druUgvl0LCNAfugRpC6u6w
  Cc: mhocko-DgEjT+Ai2ygdnm+yROfE0A,
	vdavydov.dev-Re5JQEeQqe8AvxtiuMwx3w,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	cgroups-u79uwXL29TY76Z2rM5mHXA, linux-mm-Bw31MaZKKs3YtjvyW6yDsg,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, YANG LI

The ret is being used but it isn't being initialized,
need to assign a value to it, like 0.

Signed-off-by: YANG LI <abaci-bugfix-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
Reported-by: Abaci <abaci-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 605f671..15ba17d 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3366,7 +3366,7 @@ static int mem_cgroup_resize_max(struct mem_cgroup *memcg,
 {
 	bool enlarge = false;
 	bool drained = false;
-	int ret;
+	int ret = 0;
 	bool limits_invariant;
 	struct page_counter *counter = memsw ? &memcg->memsw : &memcg->memory;
 
-- 
1.8.3.1


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

end of thread, other threads:[~2021-01-05 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-30  6:59 [PATCH] mm: fix: Uninitialized variable ret YANG LI
     [not found] ` <1609311551-97108-1-git-send-email-abaci-bugfix-KPsoFbNs7GizrGE5bRqYAgC/G2K4zDHf@public.gmane.org>
2020-12-30  7:10   ` Muchun Song
2021-01-05 11:03   ` David Hildenbrand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox