Loading drivers/mtd/inftlmount.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -580,14 +580,13 @@ int INFTL_mount(struct INFTLrecord *s) logical_block = block = BLOCK_NIL; logical_block = block = BLOCK_NIL; /* Temporary buffer to store ANAC numbers. */ /* 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) { if (!ANACtable) { printk(KERN_WARNING "INFTL: allocation of ANACtable " printk(KERN_WARNING "INFTL: allocation of ANACtable " "failed (%zd bytes)\n", "failed (%zd bytes)\n", s->nb_blocks * sizeof(u8)); s->nb_blocks * sizeof(u8)); return -ENOMEM; return -ENOMEM; } } memset(ANACtable, 0, s->nb_blocks); /* /* * First pass is to explore each physical unit, and construct the * First pass is to explore each physical unit, and construct the Loading Loading
drivers/mtd/inftlmount.c +1 −2 Original line number Original line Diff line number Diff line Loading @@ -580,14 +580,13 @@ int INFTL_mount(struct INFTLrecord *s) logical_block = block = BLOCK_NIL; logical_block = block = BLOCK_NIL; /* Temporary buffer to store ANAC numbers. */ /* 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) { if (!ANACtable) { printk(KERN_WARNING "INFTL: allocation of ANACtable " printk(KERN_WARNING "INFTL: allocation of ANACtable " "failed (%zd bytes)\n", "failed (%zd bytes)\n", s->nb_blocks * sizeof(u8)); s->nb_blocks * sizeof(u8)); return -ENOMEM; return -ENOMEM; } } memset(ANACtable, 0, s->nb_blocks); /* /* * First pass is to explore each physical unit, and construct the * First pass is to explore each physical unit, and construct the Loading