From: Joe Perches Date: Sat, 28 May 2011 17:36:29 +0000 (-0700) Subject: mtd: convert vmalloc/memset to vzalloc X-Git-Tag: next-20110726~35^2~174 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ab7fac07d069ba45f57493a960b088ae1b7c47f9;p=karo-tx-linux.git mtd: convert vmalloc/memset to vzalloc Signed-off-by: Joe Perches Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c index fd7885327611..5e5423b2aed2 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;