diff options
author | David S. Miller <davem@davemloft.net> | 2014-08-23 11:12:08 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-08-23 11:12:08 -0700 |
commit | f9474ddfaa009ead12bba44fa8fd49dc4536a124 (patch) | |
tree | a1738a74ac909d84cc80af674d7c0b78af10a413 /net/tipc/port.h | |
parent | 989e04c5bc3ff77d65e1f0d87bf7904dfa30d41c (diff) | |
parent | a45e92a599e77ee6a850eabdd0141633fde03915 (diff) | |
download | linux-f9474ddfaa009ead12bba44fa8fd49dc4536a124.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pulling to get some TIPC fixes that a net-next series depends
upon.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/port.h')
-rw-r--r-- | net/tipc/port.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/tipc/port.h b/net/tipc/port.h index 3f93454592b6..3087da39ee47 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h @@ -179,9 +179,12 @@ static inline int tipc_port_importance(struct tipc_port *port) return msg_importance(&port->phdr); } -static inline void tipc_port_set_importance(struct tipc_port *port, int imp) +static inline int tipc_port_set_importance(struct tipc_port *port, int imp) { + if (imp > TIPC_CRITICAL_IMPORTANCE) + return -EINVAL; msg_set_importance(&port->phdr, (u32)imp); + return 0; } #endif |