Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireles...
[pandora-kernel.git] / drivers / mtd / inftlmount.c
index ecac0e4..c551d2f 100644 (file)
 
 char inftlmountrev[]="$Revision: 1.18 $";
 
-extern int inftl_read_oob(struct mtd_info *mtd, loff_t offs, size_t len,
-                         size_t *retlen, uint8_t *buf);
-extern int inftl_write_oob(struct mtd_info *mtd, loff_t offs, size_t len,
-                          size_t *retlen, uint8_t *buf);
-
 /*
  * find_boot_record: Find the INFTL Media Header and its Spare copy which
  *     contains the various device information of the INFTL partition and
@@ -580,14 +575,13 @@ int INFTL_mount(struct INFTLrecord *s)
        logical_block = block = BLOCK_NIL;
 
        /* Temporary buffer to store ANAC numbers. */
-       ANACtable = kmalloc(s->nb_blocks * sizeof(u8), GFP_KERNEL);
+       ANACtable = kcalloc(s->nb_blocks, sizeof(u8), GFP_KERNEL);
        if (!ANACtable) {
                printk(KERN_WARNING "INFTL: allocation of ANACtable "
                                "failed (%zd bytes)\n",
                                s->nb_blocks * sizeof(u8));
                return -ENOMEM;
        }
-       memset(ANACtable, 0, s->nb_blocks);
 
        /*
         * First pass is to explore each physical unit, and construct the