diff options
| author | Akinobu Mita <[email protected]> | 2010-05-26 21:43:29 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2010-05-27 16:12:47 +0000 |
| commit | b957e043ee557ca9b6bc451755ecd849b28852a4 (patch) | |
| tree | cd5046c854264a71a2de6261a0d2996a098b5c88 /lib/cpu-notifier-error-inject.c | |
| parent | cpu-hotplug: return better errno on cpu hotplug failure (diff) | |
| download | kernel-b957e043ee557ca9b6bc451755ecd849b28852a4.tar.gz kernel-b957e043ee557ca9b6bc451755ecd849b28852a4.zip | |
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/cpu-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions
