Skip to content

Commit 1cd916d

Browse files
committed
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: 524e00b ("mm: remove rb tree.") Reported-by: kernel test robot <[email protected]> Cc: Liam R. Howlett <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 5789151 commit 1cd916d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/mmap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,8 @@ int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
618618
struct vm_area_struct *expand)
619619
{
620620
struct mm_struct *mm = vma->vm_mm;
621-
struct vm_area_struct *next_next, *next = find_vma(mm, vma->vm_end);
621+
struct vm_area_struct *next_next = NULL; /* uninit var warning */
622+
struct vm_area_struct *next = find_vma(mm, vma->vm_end);
622623
struct vm_area_struct *orig_vma = vma;
623624
struct address_space *mapping = NULL;
624625
struct rb_root_cached *root = NULL;

0 commit comments

Comments
 (0)