[PATCH] mm/mmap.c: Remove redundant statement "error = -ENOMEM"
From: Chen Gang
Date: Mon Oct 05 2015 - 11:55:41 EST
>From 4150fd59c4aa35d36e81920ecb2a522c8c7b68b9 Mon Sep 17 00:00:00 2001
From: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
Date: Mon, 5 Oct 2015 23:43:30 +0800
Subject: [PATCH] mm/mmap.c: Remove redundant statement "error = -ENOMEM"
It is still a little better to remove it, although it should be skipped
by "-O2".
Signed-off-by: Chen Gang <gang.chen.5i5j@xxxxxxxxx>
---
mm/mmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 8393580..1da4600 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1562,7 +1562,6 @@ unsigned long mmap_region(struct file *file, unsigned long addr,
}
/* Clear old maps */
- error = -ENOMEM;
while (find_vma_links(mm, addr, addr + len, &prev, &rb_link,
&rb_parent)) {
if (do_munmap(mm, addr, len))
--
1.9.3
Attachment:
0001-mm-mmap.c-Remove-redundant-statement-error-ENOMEM.patch
Description: Binary data