]> git.baikalelectronics.ru Git - kernel.git/commit
include/linux/err.h: add a function to cast error-pointers to a return value
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 22 Mar 2011 23:34:05 +0000 (16:34 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:11 +0000 (17:44 -0700)
commit56ca32aab1f7f1a9eba3ecadd2c5743b602ad9ac
tree7fa3808a38b2d8f161d750156804e643288e4304
parent5d239d1728750670bf2a080ae84f86b86cb95ca0
include/linux/err.h: add a function to cast error-pointers to a return value

PTR_RET() can be used if you have an error-pointer and are only interested
in the eventual error value, but not the pointer.  Yields the usual 0 for
no error, -ESOMETHING otherwise.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/err.h