提交 8bcbdf60 编写于 作者: Y Yan Burman 提交者: Linus Torvalds

[PATCH] m68k: replace kmalloc+memset with kzalloc

Replace kmalloc+memset with kzalloc
Signed-off-by: NYan Burman <burman.yan@gmail.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 58e14b14
......@@ -52,10 +52,9 @@ void *amiga_chip_alloc(unsigned long size, const char *name)
#ifdef DEBUG
printk("amiga_chip_alloc: allocate %ld bytes\n", size);
#endif
res = kmalloc(sizeof(struct resource), GFP_KERNEL);
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
if (!res)
return NULL;
memset(res, 0, sizeof(struct resource));
res->name = name;
if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) {
......
......@@ -375,10 +375,9 @@ struct pci_bus_info * __init init_hades_pci(void)
* Allocate memory for bus info structure.
*/
bus = kmalloc(sizeof(struct pci_bus_info), GFP_KERNEL);
bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL);
if (!bus)
return NULL;
memset(bus, 0, sizeof(struct pci_bus_info));
/*
* Claim resources. The m68k has no separate I/O space, both
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册