]> Pileus Git - ~andy/linux/blobdiff - net/tipc/port.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[~andy/linux] / net / tipc / port.c
index d43f3182b1d4cc1628817d882c9d006006e27e1e..b742b2654525e2b4c7bd7974c0b7ae6f0356156f 100644 (file)
@@ -817,17 +817,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;
 }
 
 /*