Loading arch/ppc/platforms/ev64360.c +1 −2 Original line number Diff line number Diff line Loading @@ -358,13 +358,12 @@ ev64360_setup_mtd(void) ptbl_entries = 3; if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), if ((ptbl = kzalloc(ptbl_entries * sizeof(struct mtd_partition), GFP_KERNEL)) == NULL) { printk(KERN_WARNING "Can't alloc MTD partition table\n"); return -ENOMEM; } memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); ptbl[0].name = "reserved"; ptbl[0].offset = 0; Loading drivers/mtd/afs.c +1 −2 Original line number Diff line number Diff line Loading @@ -207,11 +207,10 @@ static int parse_afs_partitions(struct mtd_info *mtd, if (!sz) return ret; parts = kmalloc(sz, GFP_KERNEL); parts = kzalloc(sz, GFP_KERNEL); if (!parts) return -ENOMEM; memset(parts, 0, sz); str = (char *)(parts + idx); /* Loading drivers/mtd/chips/amd_flash.c +1 −2 Original line number Diff line number Diff line Loading @@ -643,13 +643,12 @@ static struct mtd_info *amd_flash_probe(struct map_info *map) int reg_idx; int offset; mtd = (struct mtd_info*)kmalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); if (!mtd) { printk(KERN_WARNING "%s: kmalloc failed for info structure\n", map->name); return NULL; } memset(mtd, 0, sizeof(*mtd)); mtd->priv = map; memset(&temp, 0, sizeof(temp)); Loading drivers/mtd/chips/cfi_cmdset_0001.c +1 −2 Original line number Diff line number Diff line Loading @@ -337,12 +337,11 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) struct mtd_info *mtd; int i; mtd = kmalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); if (!mtd) { printk(KERN_ERR "Failed to allocate memory for MTD device\n"); return NULL; } memset(mtd, 0, sizeof(*mtd)); mtd->priv = map; mtd->type = MTD_NORFLASH; Loading drivers/mtd/chips/cfi_cmdset_0002.c +1 −2 Original line number Diff line number Diff line Loading @@ -257,12 +257,11 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) struct mtd_info *mtd; int i; mtd = kmalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); if (!mtd) { printk(KERN_WARNING "Failed to allocate memory for MTD device\n"); return NULL; } memset(mtd, 0, sizeof(*mtd)); mtd->priv = map; mtd->type = MTD_NORFLASH; Loading Loading
arch/ppc/platforms/ev64360.c +1 −2 Original line number Diff line number Diff line Loading @@ -358,13 +358,12 @@ ev64360_setup_mtd(void) ptbl_entries = 3; if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), if ((ptbl = kzalloc(ptbl_entries * sizeof(struct mtd_partition), GFP_KERNEL)) == NULL) { printk(KERN_WARNING "Can't alloc MTD partition table\n"); return -ENOMEM; } memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); ptbl[0].name = "reserved"; ptbl[0].offset = 0; Loading
drivers/mtd/afs.c +1 −2 Original line number Diff line number Diff line Loading @@ -207,11 +207,10 @@ static int parse_afs_partitions(struct mtd_info *mtd, if (!sz) return ret; parts = kmalloc(sz, GFP_KERNEL); parts = kzalloc(sz, GFP_KERNEL); if (!parts) return -ENOMEM; memset(parts, 0, sz); str = (char *)(parts + idx); /* Loading
drivers/mtd/chips/amd_flash.c +1 −2 Original line number Diff line number Diff line Loading @@ -643,13 +643,12 @@ static struct mtd_info *amd_flash_probe(struct map_info *map) int reg_idx; int offset; mtd = (struct mtd_info*)kmalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); if (!mtd) { printk(KERN_WARNING "%s: kmalloc failed for info structure\n", map->name); return NULL; } memset(mtd, 0, sizeof(*mtd)); mtd->priv = map; memset(&temp, 0, sizeof(temp)); Loading
drivers/mtd/chips/cfi_cmdset_0001.c +1 −2 Original line number Diff line number Diff line Loading @@ -337,12 +337,11 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) struct mtd_info *mtd; int i; mtd = kmalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); if (!mtd) { printk(KERN_ERR "Failed to allocate memory for MTD device\n"); return NULL; } memset(mtd, 0, sizeof(*mtd)); mtd->priv = map; mtd->type = MTD_NORFLASH; Loading
drivers/mtd/chips/cfi_cmdset_0002.c +1 −2 Original line number Diff line number Diff line Loading @@ -257,12 +257,11 @@ struct mtd_info *cfi_cmdset_0002(struct map_info *map, int primary) struct mtd_info *mtd; int i; mtd = kmalloc(sizeof(*mtd), GFP_KERNEL); mtd = kzalloc(sizeof(*mtd), GFP_KERNEL); if (!mtd) { printk(KERN_WARNING "Failed to allocate memory for MTD device\n"); return NULL; } memset(mtd, 0, sizeof(*mtd)); mtd->priv = map; mtd->type = MTD_NORFLASH; Loading