diff options
author | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2006-11-20 22:22:12 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:30:21 -0500 |
commit | 2710b57ff9b1437cfbe96b23ae86fedf3239f1ca (patch) | |
tree | 6395382004f63722a23e13d8997362104a91243d /net/tipc/node.c | |
parent | e69062b4f728dca01ec1a9eb4ed55b73a374f164 (diff) |
[TIPC]: Use kzalloc where appropriate
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
60 | struct node *n_ptr; | 60 | struct node *n_ptr; |
61 | struct node **curr_node; | 61 | struct node **curr_node; |
62 | 62 | ||
63 | n_ptr = kmalloc(sizeof(*n_ptr),GFP_ATOMIC); | 63 | n_ptr = kzalloc(sizeof(*n_ptr),GFP_ATOMIC); |
64 | if (!n_ptr) { | 64 | if (!n_ptr) { |
65 | warn("Node creation failed, no memory\n"); | 65 | warn("Node creation failed, no memory\n"); |
66 | return NULL; | 66 | return NULL; |
@@ -75,7 +75,6 @@ struct node *tipc_node_create(u32 addr) | |||
75 | return NULL; | 75 | return NULL; |
76 | } | 76 | } |
77 | 77 | ||
78 | memset(n_ptr, 0, sizeof(*n_ptr)); | ||
79 | n_ptr->addr = addr; | 78 | n_ptr->addr = addr; |
80 | spin_lock_init(&n_ptr->lock); | 79 | spin_lock_init(&n_ptr->lock); |
81 | INIT_LIST_HEAD(&n_ptr->nsub); | 80 | INIT_LIST_HEAD(&n_ptr->nsub); |