[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a0ee7c70b2
commit
0da974f4f3
@@ -58,13 +58,12 @@ static int __rxrpc_create_peer(struct rxrpc_transport *trans, __be32 addr,
|
||||
_enter("%p,%08x", trans, ntohl(addr));
|
||||
|
||||
/* allocate and initialise a peer record */
|
||||
peer = kmalloc(sizeof(struct rxrpc_peer), GFP_KERNEL);
|
||||
peer = kzalloc(sizeof(struct rxrpc_peer), GFP_KERNEL);
|
||||
if (!peer) {
|
||||
_leave(" = -ENOMEM");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
memset(peer, 0, sizeof(struct rxrpc_peer));
|
||||
atomic_set(&peer->usage, 1);
|
||||
|
||||
INIT_LIST_HEAD(&peer->link);
|
||||
|
Reference in New Issue
Block a user