aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/notifier.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-31 08:46:45 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-31 08:46:45 -0400
commit64960848abd18d0bcde3f53ffa7ed0b631e6b25d (patch)
tree8424a1c550a98ce09f127425fde9b7b5f2f5027a /include/linux/notifier.h
parent2903037400a26e7c0cc93ab75a7d62abfacdf485 (diff)
parent67a3e12b05e055c0415c556a315a3d3eb637e29e (diff)
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'include/linux/notifier.h')
-rw-r--r--include/linux/notifier.h5
1 files changed, 4 insertions, 1 deletions
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,
164/* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */ 164/* Encapsulate (negative) errno value (in particular, NOTIFY_BAD <=> EPERM). */
165static inline int notifier_from_errno(int err) 165static inline int notifier_from_errno(int err)
166{ 166{
167 return NOTIFY_STOP_MASK | (NOTIFY_OK - err); 167 if (err)
168 return NOTIFY_STOP_MASK | (NOTIFY_OK - err);
169
170 return NOTIFY_OK;
168} 171}
169 172
170/* Restore (negative) errno value from notify return value. */ 173/* Restore (negative) errno value from notify return value. */