From: Andrew Morton Date: Tue, 18 Oct 2022 20:57:37 +0000 (-0700) Subject: mm/mmap.c: __vma_adjust(): suppress uninitialized var warning X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=1cd916d0340d0f45b151599c24ec40b5b2fd8e4a;p=linux.git mm/mmap.c: __vma_adjust(): suppress uninitialized var warning The code is OK, but it fools gcc. mm/mmap.c:802 __vma_adjust() error: uninitialized symbol 'next_next'. Fixes: 524e00b36e8c5 ("mm: remove rb tree.") Reported-by: kernel test robot Cc: Liam R. Howlett Signed-off-by: Andrew Morton --- diff --git a/mm/mmap.c b/mm/mmap.c index 3c9890e443a3e..721fe5c82a0e6 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -618,7 +618,8 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start, struct vm_area_struct *expand) { struct mm_struct *mm = vma->vm_mm; - struct vm_area_struct *next_next, *next = find_vma(mm, vma->vm_end); + struct vm_area_struct *next_next = NULL; /* uninit var warning */ + struct vm_area_struct *next = find_vma(mm, vma->vm_end); struct vm_area_struct *orig_vma = vma; struct address_space *mapping = NULL; struct rb_root_cached *root = NULL;