X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=include%2Flinux%2Fnotifier.h;h=540703b555cb2be4bbea2d8e7f0b84d96ca3b474;hp=7c36096223340a1d674b253430e5128b71f7abaa;hb=b957e043ee557ca9b6bc451755ecd849b28852a4;hpb=1e4b1057121bc756b91758a434b504d2010f6088 diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 7c3609622334..540703b555cb 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -164,7 +164,10 @@ extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh, /* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */ static inline int notifier_from_errno(int err) { - return NOTIFY_STOP_MASK | (NOTIFY_OK - err); + if (err) + return NOTIFY_STOP_MASK | (NOTIFY_OK - err); + + return NOTIFY_OK; } /* Restore (negative) errno value from notify return value. */