err.h: add helper function to simplify pointer error checking
authorPhil Carmody <ext-phil.2.carmody@nokia.com>
Tue, 15 Dec 2009 02:00:29 +0000 (18:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Dec 2009 16:53:27 +0000 (08:53 -0800)
commit603c4ba96be998a8dd7a6f9b23681c49acdf4b64
tree1b85fc526219085ceaffca54150eee64c3aba4a0
parent9385565e20c4acf97cd8e2fd7155750e578edcc4
err.h: add helper function to simplify pointer error checking

There are quite a few instances in the kernel of checks of pointers both
against NULL and against the errno range, handling both cases identically.
This additional helper function would simplify such code.

[akpm@linux-foundation.org: build fix]
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/err.h