mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2ecb0924d7
commit
811102ca23
1 changed files with 2 additions and 3 deletions
|
@ -200,9 +200,8 @@ 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) {
|
||||
return;
|
||||
if (!n_ptr)
|
||||
return;
|
||||
}
|
||||
spin_lock_bh(&n_ptr->lock);
|
||||
link = n_ptr->links[b_ptr->identity];
|
||||
|
|
Loading…
Reference in a new issue