Skip to content

Commit

Permalink
mm/mmap.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Duan Jiong authored and Linus Torvalds committed Jun 4, 2014
1 parent cea371f commit 14bd5b4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mm/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 14bd5b4

Please sign in to comment.