]> err.no Git - linux-2.6/blobdiff - arch/ppc/platforms/katana.c
[PATCH] ppc32: add 440GX erratum 440_43 workaround
[linux-2.6] / arch / ppc / platforms / katana.c
index d2766617c3cb9ea9e5cf0580d0fc12772e572f6f..ad21280e892095abd5fa6759b86bcf5cc4c03a4a 100644 (file)
@@ -596,7 +596,7 @@ katana_fixup_mv64xxx_pdata(struct platform_device *pdev)
 }
 #endif
 
-static int __init
+static int
 katana_platform_notify(struct device *dev)
 {
        static struct {
@@ -662,12 +662,11 @@ katana_setup_mtd(void)
 
        ptbl_entries = (size >= (64*MB)) ? 6 : 4;
 
-       if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition),
+       if ((ptbl = kcalloc(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 = "Monitor";
        ptbl[0].size = KATANA_MTD_MONITOR_SIZE;