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.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index c081a7632302..5fd4c8cec08e 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -832,17 +832,14 @@ exit:
832 */ 832 */
833int __tipc_disconnect(struct tipc_port *tp_ptr) 833int __tipc_disconnect(struct tipc_port *tp_ptr)
834{ 834{
835 int res;
836
837 if (tp_ptr->connected) { 835 if (tp_ptr->connected) {
838 tp_ptr->connected = 0; 836 tp_ptr->connected = 0;
839 /* let timer expire on it's own to avoid deadlock! */ 837 /* let timer expire on it's own to avoid deadlock! */
840 tipc_nodesub_unsubscribe(&tp_ptr->subscription); 838 tipc_nodesub_unsubscribe(&tp_ptr->subscription);
841 res = 0; 839 return 0;
842 } else {
843 res = -ENOTCONN;
844 } 840 }
845 return res; 841
842 return -ENOTCONN;
846} 843}
847 844
848/* 845/*