diff mbox

[net-next,01/10] tipc: remove unnecessary checking for node object

Message ID 1395896080-7926-2-git-send-email-ying.xue@windriver.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ying Xue March 27, 2014, 4:54 a.m. UTC
tipc_node_create routine doesn't need to check whether a node
object specified with a node address exists or not because its
caller(ie, tipc_disc_recv_msg routine) has checked this before
calling it.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Jon Maloy <jon.maloy@ericsson.com>
---
 net/tipc/node.c |    6 ------
 1 file changed, 6 deletions(-)
diff mbox

Patch

diff --git a/net/tipc/node.c b/net/tipc/node.c
index 0b0f6c7..7c9b667 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -95,12 +95,6 @@  struct tipc_node *tipc_node_create(u32 addr)
 
 	spin_lock_bh(&node_create_lock);
 
-	n_ptr = tipc_node_find(addr);
-	if (n_ptr) {
-		spin_unlock_bh(&node_create_lock);
-		return n_ptr;
-	}
-
 	n_ptr = kzalloc(sizeof(*n_ptr), GFP_ATOMIC);
 	if (!n_ptr) {
 		spin_unlock_bh(&node_create_lock);