[MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed Aug 1 06:59:01 EDT 2007
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d67d1d7fc344e44b51296327a0b09a9419ca307f
Commit: d67d1d7fc344e44b51296327a0b09a9419ca307f
Parent: 8f0f23f97adbd833000e25e41c1310e49ace9ba8
Author: Mariusz Kozlowski <m.kozlowski at tuxland.pl>
AuthorDate: Tue Jul 31 20:03:14 2007 +0200
Committer: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Wed Aug 1 11:02:40 2007 +0100
[MTD] drivers/mtd/inftlmount.c: kmalloc + memset conversion to kcalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski at tuxland.pl>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
drivers/mtd/inftlmount.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
index ecac0e4..b8917be 100644
--- a/drivers/mtd/inftlmount.c
+++ b/drivers/mtd/inftlmount.c
@@ -580,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
More information about the linux-mtd-cvs
mailing list