]> git.baikalelectronics.ru Git - kernel.git/commit
mm: remove more IS_ERR_VALUE abuses
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 22:57:31 +0000 (15:57 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 27 May 2016 22:57:31 +0000 (15:57 -0700)
commit38691d1db4733850c6723e1fa4ebf720bcfa6bdb
tree464a86dc3d004dd334e37a8fe7e7b42f8511581e
parent63b1648f6f73137db6add0f072913893cf494745
mm: remove more IS_ERR_VALUE abuses

The do_brk() and vm_brk() return value was "unsigned long" and returned
the starting address on success, and an error value on failure.  The
reasons are entirely historical, and go back to it basically behaving
like the mmap() interface does.

However, nobody actually wanted that interface, and it causes totally
pointless IS_ERR_VALUE() confusion.

What every single caller actually wants is just the simpler integer
return of zero for success and negative error number on failure.

So just convert to that much clearer and more common calling convention,
and get rid of all the IS_ERR_VALUE() uses wrt vm_brk().

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/ia32/ia32_aout.c
fs/binfmt_aout.c
fs/binfmt_elf.c
include/linux/mm.h
mm/mmap.c
mm/nommu.c