mtd: convert vmalloc/memset to vzalloc

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:02 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=1712cde28532d9b0c98142e08a131b344d3200bd
Commit:     1712cde28532d9b0c98142e08a131b344d3200bd
Parent:     93ee7a9340d64f20295aacc3fb6a22b759323280
Author:     Joe Perches <joe at perches.com>
AuthorDate: Sat May 28 10:36:29 2011 -0700
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Mon Aug 15 13:26:37 2011 +0300

    mtd: convert vmalloc/memset to vzalloc
    
    Signed-off-by: Joe Perches <joe at perches.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 drivers/mtd/mtdswap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index fd78853..5e5423b 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1374,11 +1374,10 @@ static int mtdswap_init(struct mtdswap_dev *d, unsigned int eblocks,
 		goto revmap_fail;
 
 	eblk_bytes = sizeof(struct swap_eb)*d->eblks;
-	d->eb_data = vmalloc(eblk_bytes);
+	d->eb_data = vzalloc(eblk_bytes);
 	if (!d->eb_data)
 		goto eb_data_fail;
 
-	memset(d->eb_data, 0, eblk_bytes);
 	for (i = 0; i < pages; i++)
 		d->page_data[i] = BLOCK_UNDEF;
 



More information about the linux-mtd-cvs mailing list