提交 0268bd0a 编写于 作者: Y Yan Burman 提交者: Adrian Bunk

um: replace kmalloc+memset with kzalloc

Replace kmalloc+memset with kzalloc
Signed-off-by: NYan Burman <burman.yan@gmail.com>
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
上级 47c6bf77
......@@ -334,13 +334,12 @@ static int eth_configure(int n, void *init, char *mac,
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册