]> git.baikalelectronics.ru Git - kernel.git/commit
notifier: change notifier_from_errno(0) to return NOTIFY_OK
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 26 May 2010 21:43:29 +0000 (14:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:12:47 +0000 (09:12 -0700)
commitbdf1a58f86c3d929429df9a95ecfba123bb6c981
treecd5046c854264a71a2de6261a0d2996a098b5c88
parentc88cfa7b06746ece7e7616ceecdec6f71bf567b0
notifier: change notifier_from_errno(0) to return NOTIFY_OK

This changes notifier_from_errno(0) to be NOTIFY_OK instead of
NOTIFY_STOP_MASK | NOTIFY_OK.

Currently, the notifiers which return encapsulated errno value have to
do something like this:

err = do_something(); // returns -errno
if (err)
return notifier_from_errno(err);
else
return NOTIFY_OK;

This change makes the above code simple:

err = do_something(); // returns -errno

return return notifier_from_errno(err);

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/notifier.h