diff mbox series

mm: trivial clean up in insert_page()

Message ID 20190523134024.GC24093@localhost.localdomain (mailing list archive)
State New, archived
Headers show
Series mm: trivial clean up in insert_page() | expand

Commit Message

Miklos Szeredi May 23, 2019, 1:40 p.m. UTC
Make the success case use the same cleanup path as the failure case.

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
 mm/memory.c |    2 --
 1 file changed, 2 deletions(-)

Comments

Anshuman Khandual May 24, 2019, 1:18 p.m. UTC | #1
On 05/23/2019 07:10 PM, Miklos Szeredi wrote:
> Make the success case use the same cleanup path as the failure case.
> 
> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>

Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
diff mbox series

Patch

--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1470,8 +1470,6 @@  static int insert_page(struct vm_area_st
 	set_pte_at(mm, addr, pte, mk_pte(page, prot));
 
 	retval = 0;
-	pte_unmap_unlock(pte, ptl);
-	return retval;
 out_unlock:
 	pte_unmap_unlock(pte, ptl);
 out: