aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/platforms/katana.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-03-06 15:13:32 -0500
committerPaul Mackerras <paulus@samba.org>2006-03-16 21:20:57 -0500
commitd116fe5aeafd8226712d2de9c69428725ca74474 (patch)
tree5c65b1b18d495ac9d16e875a7a4f99863ffe0edb /arch/ppc/platforms/katana.c
parent0f6be7b77ceaea01a35b37fab26f4ea3b01efe14 (diff)
[PATCH] kzalloc() conversion in arch/ppc
This converts arch/ppc to kzalloc usage. Crosscompile tested with allyesconfig. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/platforms/katana.c')
-rw-r--r--arch/ppc/platforms/katana.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c
index d2766617c3cb..6f3bc6161746 100644
--- a/arch/ppc/platforms/katana.c
+++ b/arch/ppc/platforms/katana.c
@@ -662,12 +662,11 @@ katana_setup_mtd(void)
662 662
663 ptbl_entries = (size >= (64*MB)) ? 6 : 4; 663 ptbl_entries = (size >= (64*MB)) ? 6 : 4;
664 664
665 if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), 665 if ((ptbl = kcalloc(ptbl_entries, sizeof(struct mtd_partition),
666 GFP_KERNEL)) == NULL) { 666 GFP_KERNEL)) == NULL) {
667 printk(KERN_WARNING "Can't alloc MTD partition table\n"); 667 printk(KERN_WARNING "Can't alloc MTD partition table\n");
668 return -ENOMEM; 668 return -ENOMEM;
669 } 669 }
670 memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition));
671 670
672 ptbl[0].name = "Monitor"; 671 ptbl[0].name = "Monitor";
673 ptbl[0].size = KATANA_MTD_MONITOR_SIZE; 672 ptbl[0].size = KATANA_MTD_MONITOR_SIZE;