X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmtd%2Finftlmount.c;h=b8917beeb65099262da1e316282d663e43933e39;hb=4c79141d28bc290ae307e3f81f5bc909c26faf6e;hp=acf3ba223298e2ff06ba79a769bd1a8ffb7a7911;hpb=c0cd79d11412969b6b8fa1624cdc1277db82e2fe;p=linux-2.6-omap-h63xx.git diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c index acf3ba22329..b8917beeb65 100644 --- a/drivers/mtd/inftlmount.c +++ b/drivers/mtd/inftlmount.c @@ -31,7 +31,6 @@ #include #include #include -#include #include #include #include @@ -581,14 +580,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