From 2710b57ff9b1437cfbe96b23ae86fedf3239f1ca Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Tue, 21 Nov 2006 01:22:12 -0200 Subject: [TIPC]: Use kzalloc where appropriate Signed-off-by: Arnaldo Carvalho de Melo --- net/tipc/node.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'net/tipc/node.c') diff --git a/net/tipc/node.c b/net/tipc/node.c index 106cd0dfac78..4111a31def79 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -60,7 +60,7 @@ struct node *tipc_node_create(u32 addr) struct node *n_ptr; struct node **curr_node; - n_ptr = kmalloc(sizeof(*n_ptr),GFP_ATOMIC); + n_ptr = kzalloc(sizeof(*n_ptr),GFP_ATOMIC); if (!n_ptr) { warn("Node creation failed, no memory\n"); return NULL; @@ -75,7 +75,6 @@ struct node *tipc_node_create(u32 addr) return NULL; } - memset(n_ptr, 0, sizeof(*n_ptr)); n_ptr->addr = addr; spin_lock_init(&n_ptr->lock); INIT_LIST_HEAD(&n_ptr->nsub); -- cgit v1.2.3