mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
[PATCH] m68k: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <burman.yan@gmail.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
58e14b148d
commit
8bcbdf603b
2 changed files with 2 additions and 4 deletions
|
@ -52,10 +52,9 @@ void *amiga_chip_alloc(unsigned long size, const char *name)
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printk("amiga_chip_alloc: allocate %ld bytes\n", size);
|
printk("amiga_chip_alloc: allocate %ld bytes\n", size);
|
||||||
#endif
|
#endif
|
||||||
res = kmalloc(sizeof(struct resource), GFP_KERNEL);
|
res = kzalloc(sizeof(struct resource), GFP_KERNEL);
|
||||||
if (!res)
|
if (!res)
|
||||||
return NULL;
|
return NULL;
|
||||||
memset(res, 0, sizeof(struct resource));
|
|
||||||
res->name = name;
|
res->name = name;
|
||||||
|
|
||||||
if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) {
|
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.
|
* 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)
|
if (!bus)
|
||||||
return NULL;
|
return NULL;
|
||||||
memset(bus, 0, sizeof(struct pci_bus_info));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Claim resources. The m68k has no separate I/O space, both
|
* Claim resources. The m68k has no separate I/O space, both
|
||||||
|
|
Loading…
Reference in a new issue