[PATCH] powerpc/vdso: fix ptr_ret.cocci warnings
kernel test robot
lkp at intel.com
Sat Nov 28 02:38:46 AEDT 2020
From: kernel test robot <lkp at intel.com>
arch/powerpc/kernel/vdso.c:192:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Generated by: scripts/coccinelle/api/ptr_ret.cocci
Fixes: 08bbcbede11f ("powerpc/vdso: Move to _install_special_mapping() and remove arch_vma_name()")
CC: Christophe Leroy <christophe.leroy at csgroup.eu>
Reported-by: kernel test robot <lkp at intel.com>
Signed-off-by: kernel test robot <lkp at intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test
head: 278f4532318c176ef8a22a78f45a8c8a30abe40b
commit: 08bbcbede11f0a75d620799ef8fc1f081ac66c79 [89/109] powerpc/vdso: Move to _install_special_mapping() and remove arch_vma_name()
vdso.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -189,10 +189,7 @@ static int __arch_setup_additional_pages
vma = _install_special_mapping(mm, vdso_base, vdso_size,
VM_READ | VM_EXEC | VM_MAYREAD |
VM_MAYWRITE | VM_MAYEXEC, vdso_spec);
- if (IS_ERR(vma))
- return PTR_ERR(vma);
-
- return 0;
+ return PTR_ERR_OR_ZERO(vma);
}
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
More information about the Linuxppc-dev
mailing list