Skip to content
Commit b957e043 authored by Akinobu Mita's avatar Akinobu Mita Committed by Linus Torvalds
Browse files

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: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e6bde73b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment