Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Yan Burman and committed by
Linus Torvalds
8bcbdf60 58e14b14

+2 -4
+1 -2
arch/m68k/amiga/chipram.c
··· 52 52 #ifdef DEBUG 53 53 printk("amiga_chip_alloc: allocate %ld bytes\n", size); 54 54 #endif 55 - res = kmalloc(sizeof(struct resource), GFP_KERNEL); 55 + res = kzalloc(sizeof(struct resource), GFP_KERNEL); 56 56 if (!res) 57 57 return NULL; 58 - memset(res, 0, sizeof(struct resource)); 59 58 res->name = name; 60 59 61 60 if (allocate_resource(&chipram_res, res, size, 0, UINT_MAX, PAGE_SIZE, NULL, NULL) < 0) {
+1 -2
arch/m68k/atari/hades-pci.c
··· 375 375 * Allocate memory for bus info structure. 376 376 */ 377 377 378 - bus = kmalloc(sizeof(struct pci_bus_info), GFP_KERNEL); 378 + bus = kzalloc(sizeof(struct pci_bus_info), GFP_KERNEL); 379 379 if (!bus) 380 380 return NULL; 381 - memset(bus, 0, sizeof(struct pci_bus_info)); 382 381 383 382 /* 384 383 * Claim resources. The m68k has no separate I/O space, both