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 c081a7632302..5fd4c8cec08e 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c @@ -832,17 +832,14 @@ exit: */ int __tipc_disconnect(struct tipc_port *tp_ptr) { - int res; - if (tp_ptr->connected) { tp_ptr->connected = 0; /* let timer expire on it's own to avoid deadlock! */ tipc_nodesub_unsubscribe(&tp_ptr->subscription); - res = 0; - } else { - res = -ENOTCONN; + return 0; } - return res; + + return -ENOTCONN; } /* |