Commit e83504f7 authored by Allan Stephens's avatar Allan Stephens Committed by David S. Miller

tipc: remove pointless check for NULL prior to kfree

It is acceptable to call kfree() with NULL, so these checks are not
serving any useful purpose.
Signed-off-by: default avatarAllan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 886ef52a
...@@ -240,9 +240,7 @@ static void node_is_down(struct publication *publ) ...@@ -240,9 +240,7 @@ static void node_is_down(struct publication *publ)
publ->type, publ->lower, publ->node, publ->ref, publ->key); publ->type, publ->lower, publ->node, publ->ref, publ->key);
} }
if (p) {
kfree(p); kfree(p);
}
} }
/** /**
......
...@@ -269,9 +269,7 @@ int tipc_deleteport(u32 ref) ...@@ -269,9 +269,7 @@ int tipc_deleteport(u32 ref)
buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT); buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT);
tipc_nodesub_unsubscribe(&p_ptr->subscription); tipc_nodesub_unsubscribe(&p_ptr->subscription);
} }
if (p_ptr->user_port) {
kfree(p_ptr->user_port); kfree(p_ptr->user_port);
}
spin_lock_bh(&tipc_port_list_lock); spin_lock_bh(&tipc_port_list_lock);
list_del(&p_ptr->port_list); list_del(&p_ptr->port_list);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment