diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 19:36:29 +0200 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-08-15 12:26:37 +0200 |
commit | 1712cde28532d9b0c98142e08a131b344d3200bd (patch) | |
tree | 09e517cf72f8b286aa7ff6d1981035d69e88aef6 /drivers/mtd/mtdswap.c | |
parent | Linux 3.1-rc2 (diff) | |
download | linux-1712cde28532d9b0c98142e08a131b344d3200bd.tar.xz linux-1712cde28532d9b0c98142e08a131b344d3200bd.zip |
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; |