From: Rolf Eike Beer Date: Wed, 24 Aug 2022 11:00:11 +0000 (+0200) Subject: mm: pagewalk: add back missing variable initializations X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3f092c2bf6048c47efb1168a3d7c2914f9d98057;p=users%2Fjedix%2Flinux-maple.git mm: pagewalk: add back missing variable initializations These initializations accidentially got lost during refactoring. The first one can't actually be used without initialization, because walk_p4d_range() is only called when one of the 4 callbacks is set, but relying on this seems fragile. Link: https://lkml.kernel.org/r/2123960.ggj6I0NvhH@mobilepool36.emlix.com Reported-by: Linux Kernel Functional Testing Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Rolf Eike Beer Signed-off-by: Andrew Morton --- diff --git a/mm/pagewalk.c b/mm/pagewalk.c index 4d5ce5bce190..818e00384d39 100644 --- a/mm/pagewalk.c +++ b/mm/pagewalk.c @@ -225,7 +225,7 @@ static int walk_p4d_range(pgd_t *pgd, unsigned long addr, unsigned long end, p4d = p4d_offset(pgd, addr); do { - int err; + int err = 0; next = p4d_addr_end(addr, end); if (p4d_none_or_clear_bad(p4d)) {