]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
mm/mmap.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>
Wed, 4 Jun 2014 23:07:05 +0000 (16:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:53:58 +0000 (16:53 -0700)
Fix a coccinelle error regarding usage of IS_ERR and PTR_ERR instead of
PTR_ERR_OR_ZERO.

Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c

index b1202cf81f4bddf1dcc8393f1231ed85b1e64e6e..6cdec3a6f4bfb5687833d5383576511f0e26b689 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -2965,9 +2965,7 @@ int install_special_mapping(struct mm_struct *mm,
        struct vm_area_struct *vma = _install_special_mapping(mm,
                            addr, len, vm_flags, pages);
 
-       if (IS_ERR(vma))
-               return PTR_ERR(vma);
-       return 0;
+       return PTR_ERR_OR_ZERO(vma);
 }
 
 static DEFINE_MUTEX(mm_all_locks_mutex);