mm/mmap.c: do not initialize retval in mmap_pgoff()
authorChen Gang <xili_gchen_5257@hotmail.com>
Fri, 6 Nov 2015 02:48:35 +0000 (18:48 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 6 Nov 2015 03:34:48 +0000 (19:34 -0800)
commit1e3ee14b9355a688ffe24725fa746ab120c42881
treee70d8443ce609a7f88059c9e305828b19c3fc123
parente6ee219fdd69c87ceaeb421bcd753a63937f8f31
mm/mmap.c: do not initialize retval in mmap_pgoff()

When fget() fails we can return -EBADF directly.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/mmap.c