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

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -240,10 +240,8 @@ static void node_is_down(struct publication *publ)
		    publ->type, publ->lower, publ->node, publ->ref, publ->key);
	}

	if (p) {
	kfree(p);
}
}

/**
 * tipc_named_recv - process name table update message sent by another node
+1 −3
Original line number Diff line number Diff line
@@ -269,9 +269,7 @@ int tipc_deleteport(u32 ref)
		buf = port_build_peer_abort_msg(p_ptr, TIPC_ERR_NO_PORT);
		tipc_nodesub_unsubscribe(&p_ptr->subscription);
	}
	if (p_ptr->user_port) {
	kfree(p_ptr->user_port);
	}

	spin_lock_bh(&tipc_port_list_lock);
	list_del(&p_ptr->port_list);