tipc: remove unnecessary variables and conditions
We remove a number of unnecessary variables and branches in TIPC. This patch is cosmetic and does not change the operation of TIPC in any way. Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Signed-off-by: Wang Weidong <wangweidong1@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
810c23a355
commit
0cee6bbe06
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user