linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: fix: Uninitialized variable ret.
@ 2020-12-30  6:59 YANG LI
  2020-12-30  7:10 ` Muchun Song
  2021-01-05 11:03 ` David Hildenbrand
  0 siblings, 2 replies; 3+ messages in thread
From: YANG LI @ 2020-12-30  6:59 UTC (permalink / raw)
  To: hannes
  Cc: mhocko, vdavydov.dev, akpm, cgroups, linux-mm, linux-kernel, 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@linux.alibaba.com>
Reported-by: Abaci <abaci@linux.alibaba.com>
---
 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	[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
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