diff mbox

[TRIVIAL,next,09/15] mtd: Convert vmalloc/memset to vzalloc

Message ID adc50014679048de28c7d536f1686cd945fc40f6.1306603968.git.joe@perches.com
State Accepted
Commit 1712cde28532d9b0c98142e08a131b344d3200bd
Headers show

Commit Message

Joe Perches May 28, 2011, 5:36 p.m. UTC
Signed-off-by: Joe Perches <joe@perches.com>
---
 drivers/mtd/mtdswap.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

Comments

Artem Bityutskiy June 1, 2011, 8:20 a.m. UTC | #1
On Sat, 2011-05-28 at 10:36 -0700, Joe Perches wrote:
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/mtd/mtdswap.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Pushed to l2-mtd-2.6.git, thanks.
diff mbox

Patch

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;