um: replace kmalloc+memset with kzalloc
PATCH 1/1 um: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc
Signed-off-by Yan Burman <[email protected]>
arch/um/drivers/net_kern.c +0 -0
@@ -333,13 +333,12 @@ static int eth_configure(int n, void *in
size = transport->private_size + sizeof(struct uml_net_private) + sizeof(((struct uml_net_private *) 0)->user);
- device = kmalloc(sizeof(*device), GFP_KERNEL);
+ device = kzalloc(sizeof(*device), GFP_KERNEL);
if (device == NULL) {
printk(KERN_ERR "eth_configure failed to allocate uml_net\n");
return(1);
}- memset(device, 0, sizeof(*device)); INIT_LIST_HEAD(&device->list); device->index = n;
Regards
Yan Burman