aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 2ad37a4db37..70bf78bd5b7 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -69,7 +69,7 @@ static u32 port_peerport(struct tipc_port *p_ptr)
69 return msg_destport(&p_ptr->phdr); 69 return msg_destport(&p_ptr->phdr);
70} 70}
71 71
72/* 72/**
73 * tipc_port_peer_msg - verify message was sent by connected port's peer 73 * tipc_port_peer_msg - verify message was sent by connected port's peer
74 * 74 *
75 * Handles cases where the node's network address has changed from 75 * Handles cases where the node's network address has changed from
@@ -909,8 +909,8 @@ int tipc_createport(void *usr_handle,
909 warn("Port creation failed, no memory\n"); 909 warn("Port creation failed, no memory\n");
910 return -ENOMEM; 910 return -ENOMEM;
911 } 911 }
912 p_ptr = (struct tipc_port *)tipc_createport_raw(NULL, port_dispatcher, 912 p_ptr = tipc_createport_raw(NULL, port_dispatcher, port_wakeup,
913 port_wakeup, importance); 913 importance);
914 if (!p_ptr) { 914 if (!p_ptr) {
915 kfree(up_ptr); 915 kfree(up_ptr);
916 return -ENOMEM; 916 return -ENOMEM;
@@ -1078,8 +1078,7 @@ int tipc_disconnect_port(struct tipc_port *tp_ptr)
1078 if (tp_ptr->connected) { 1078 if (tp_ptr->connected) {
1079 tp_ptr->connected = 0; 1079 tp_ptr->connected = 0;
1080 /* let timer expire on it's own to avoid deadlock! */ 1080 /* let timer expire on it's own to avoid deadlock! */
1081 tipc_nodesub_unsubscribe( 1081 tipc_nodesub_unsubscribe(&tp_ptr->subscription);
1082 &((struct tipc_port *)tp_ptr)->subscription);
1083 res = 0; 1082 res = 0;
1084 } else { 1083 } else {
1085 res = -ENOTCONN; 1084 res = -ENOTCONN;
@@ -1099,7 +1098,7 @@ int tipc_disconnect(u32 ref)
1099 p_ptr = tipc_port_lock(ref); 1098 p_ptr = tipc_port_lock(ref);
1100 if (!p_ptr) 1099 if (!p_ptr)
1101 return -EINVAL; 1100 return -EINVAL;
1102 res = tipc_disconnect_port((struct tipc_port *)p_ptr); 1101 res = tipc_disconnect_port(p_ptr);
1103 tipc_port_unlock(p_ptr); 1102 tipc_port_unlock(p_ptr);
1104 return res; 1103 return res;
1105} 1104}