summaryrefslogtreecommitdiffstats
path: root/net/tipc/port.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/port.h')
-rw-r--r--net/tipc/port.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/tipc/port.h b/net/tipc/port.h
index 3f93454..a69118f 100644
--- a/net/tipc/port.h
+++ b/net/tipc/port.h
@@ -179,8 +179,10 @@ 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);
}
OpenPOWER on IntegriCloud