]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/notifier.h
Merge branch 'upstream' into for-linus
[karo-tx-linux.git] / include / linux / notifier.h
index 7c36096223340a1d674b253430e5128b71f7abaa..540703b555cb2be4bbea2d8e7f0b84d96ca3b474 100644 (file)
@@ -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. */