UPSTREAM: ARM: 8476/1: VDSO: use PTR_ERR_OR_ZERO for vma check
authorPrasanna Karthik <mkarthi3@visteon.com>
Tue, 8 Dec 2015 16:30:25 +0000 (17:30 +0100)
committerAmit Pundir <amit.pundir@linaro.org>
Mon, 10 Apr 2017 07:53:13 +0000 (13:23 +0530)
(cherry pick from commit 38fc2f6c98262913388de338d5b0cda67e3f78cd)

Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: Prasanna Karthik <mkarthi3@visteon.com>
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Bug: 20045882
Bug: 19198045
Change-Id: Id4838948c19f031a66af1654a4c47668288a0037

arch/arm/kernel/vdso.c

index 54a5aeab988d3526657b8e3089942ca8cfe4fe5e..994e971a8538a2d316235ba1f61be54317fbba61 100644 (file)
@@ -224,7 +224,7 @@ static int install_vvar(struct mm_struct *mm, unsigned long addr)
                                       VM_READ | VM_MAYREAD,
                                       &vdso_data_mapping);
 
-       return IS_ERR(vma) ? PTR_ERR(vma) : 0;
+       return PTR_ERR_OR_ZERO(vma);
 }
 
 /* assumes mmap_sem is write-locked */