diff options
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r-- | net/tipc/port.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c index d43f3182b1d4..b742b2654525 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c | |||
@@ -817,17 +817,14 @@ exit: | |||
817 | */ | 817 | */ |
818 | int __tipc_disconnect(struct tipc_port *tp_ptr) | 818 | int __tipc_disconnect(struct tipc_port *tp_ptr) |
819 | { | 819 | { |
820 | int res; | ||
821 | |||
822 | if (tp_ptr->connected) { | 820 | if (tp_ptr->connected) { |
823 | tp_ptr->connected = 0; | 821 | tp_ptr->connected = 0; |
824 | /* let timer expire on it's own to avoid deadlock! */ | 822 | /* let timer expire on it's own to avoid deadlock! */ |
825 | tipc_nodesub_unsubscribe(&tp_ptr->subscription); | 823 | tipc_nodesub_unsubscribe(&tp_ptr->subscription); |
826 | res = 0; | 824 | return 0; |
827 | } else { | ||
828 | res = -ENOTCONN; | ||
829 | } | 825 | } |
830 | return res; | 826 | |
827 | return -ENOTCONN; | ||
831 | } | 828 | } |
832 | 829 | ||
833 | /* | 830 | /* |