[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
@@ -908,9 +908,8 @@ static struct rpc_xprt *xprt_setup(int proto, struct sockaddr_in *ap, struct rpc
|
||||
struct rpc_xprt *xprt;
|
||||
struct rpc_rqst *req;
|
||||
|
||||
if ((xprt = kmalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL)
|
||||
if ((xprt = kzalloc(sizeof(struct rpc_xprt), GFP_KERNEL)) == NULL)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
memset(xprt, 0, sizeof(*xprt)); /* Nnnngh! */
|
||||
|
||||
xprt->addr = *ap;
|
||||
|
||||
|
Reference in New Issue
Block a user