]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] m68k: replace kmalloc+memset with kzalloc
authorYan Burman <burman.yan@gmail.com>
Thu, 7 Dec 2006 04:34:51 +0000 (20:34 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Thu, 7 Dec 2006 16:39:29 +0000 (08:39 -0800)
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>
arch/m68k/amiga/chipram.c
arch/m68k/atari/hades-pci.c

index de1304c91112e1a42bd56ebe4de4bf40ef528584..fa015d80161701ccf3e8a390f8e373e072ba08f8 100644 (file)
@@ -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) {
index 6ca57b6564da1ab138f318cd8247f885acd3180d..bee2b1443e368763d9473bc86894b3ed0b60a5b2 100644 (file)
@@ -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