diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 21:36:29 +0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-08-15 14:26:37 +0400 |
commit | 1712cde28532d9b0c98142e08a131b344d3200bd (patch) | |
tree | 09e517cf72f8b286aa7ff6d1981035d69e88aef6 /drivers/mtd/mtdswap.c | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (diff) | |
download | linux-1712cde28532d9b0c98142e08a131b344d3200bd.tar.xz |
mtd: convert vmalloc/memset to vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/mtdswap.c')
-rw-r--r-- | 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 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; |