Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 811102ca authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller
Browse files

tipc: Optimize null pointer check during neighbor discovery



This patch optimizes TIPC neighbor discovery code to avoid testing for
a null node pointer when the pointer is already known to be non-null.

Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2ecb0924
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -200,8 +200,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf)
		dbg(" in own cluster\n");
		if (n_ptr == NULL) {
			n_ptr = tipc_node_create(orig);
		}
		if (n_ptr == NULL) {
			if (!n_ptr)
				return;
		}
		spin_lock_bh(&n_ptr->lock);