aboutsummaryrefslogtreecommitdiffstats
path: root/net/rxrpc/transport.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-07-24 03:38:13 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-24 03:38:13 -0400
commitb71426eb10d904d421b36f51f93c8d0ba558edac (patch)
treea8c7088a6b89499134e01750652aa55f2baa890f /net/rxrpc/transport.c
parent8419dc8a34d765f2ff1aa4051084d54cfeff09cf (diff)
parentabb5a5cc6bba1516403146c5b79036fe843beb70 (diff)
Merge branch 'master' into upstream-fixes
Diffstat (limited to 'net/rxrpc/transport.c')
-rw-r--r--net/rxrpc/transport.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/rxrpc/transport.c b/net/rxrpc/transport.c
index dbe6105e83a5..465efc86fccf 100644
--- a/net/rxrpc/transport.c
+++ b/net/rxrpc/transport.c
@@ -68,11 +68,10 @@ int rxrpc_create_transport(unsigned short port,
68 68
69 _enter("%hu", port); 69 _enter("%hu", port);
70 70
71 trans = kmalloc(sizeof(struct rxrpc_transport), GFP_KERNEL); 71 trans = kzalloc(sizeof(struct rxrpc_transport), GFP_KERNEL);
72 if (!trans) 72 if (!trans)
73 return -ENOMEM; 73 return -ENOMEM;
74 74
75 memset(trans, 0, sizeof(struct rxrpc_transport));
76 atomic_set(&trans->usage, 1); 75 atomic_set(&trans->usage, 1);
77 INIT_LIST_HEAD(&trans->services); 76 INIT_LIST_HEAD(&trans->services);
78 INIT_LIST_HEAD(&trans->link); 77 INIT_LIST_HEAD(&trans->link);
@@ -312,13 +311,12 @@ static int rxrpc_incoming_msg(struct rxrpc_transport *trans,
312 311
313 _enter(""); 312 _enter("");
314 313
315 msg = kmalloc(sizeof(struct rxrpc_message), GFP_KERNEL); 314 msg = kzalloc(sizeof(struct rxrpc_message), GFP_KERNEL);
316 if (!msg) { 315 if (!msg) {
317 _leave(" = -ENOMEM"); 316 _leave(" = -ENOMEM");
318 return -ENOMEM; 317 return -ENOMEM;
319 } 318 }
320 319
321 memset(msg, 0, sizeof(*msg));
322 atomic_set(&msg->usage, 1); 320 atomic_set(&msg->usage, 1);
323 list_add_tail(&msg->link,msgq); 321 list_add_tail(&msg->link,msgq);
324 322