diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2022-10-18 23:57:37 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-21 07:27:23 +0300 |
commit | 1cd916d0340d0f45b151599c24ec40b5b2fd8e4a (patch) | |
tree | a17ce4b989ec61dcff82dc09885a80c255cadc21 /mm/mmap.c | |
parent | 5789151e48acc3fd34d2109bf2021dc4df5e33e9 (diff) | |
download | linux-1cd916d0340d0f45b151599c24ec40b5b2fd8e4a.tar.xz |
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 <lkp@intel.com>
Cc: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 3c9890e443a3..721fe5c82a0e 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; |