aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorAllan Stephens <Allan.Stephens@windriver.com>2010-12-31 13:59:30 -0500
committerDavid S. Miller <davem@davemloft.net>2011-01-01 16:57:55 -0500
commite83504f72456809cdbdbc91700d3ba6370c9da1c (patch)
tree1391c0d5a31ea1f907d82ce43efb9a73423167a9 /net/tipc/port.c
parent886ef52a8ce6930a9d0c58267d5b5038ac3e8d30 (diff)
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: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 8bacd572a9fb..db14b7e0afdc 100644
--- a/net/tipc/port.c
+++ b/net/tipc/port.c
@@ -269,9 +269,7 @@ int tipc_deleteport(u32 ref)
269 buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT); 269 buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT);
270 tipc_nodesub_unsubscribe(&p_ptr->subscription); 270 tipc_nodesub_unsubscribe(&p_ptr->subscription);
271 } 271 }
272 if (p_ptr->user_port) { 272 kfree(p_ptr->user_port);
273 kfree(p_ptr->user_port);
274 }
275 273
276 spin_lock_bh(&tipc_port_list_lock); 274 spin_lock_bh(&tipc_port_list_lock);
277 list_del(&p_ptr->port_list); 275 list_del(&p_ptr->port_list);