summaryrefslogtreecommitdiff
path: root/drivers/mtd/mtdswap.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-28 10:36:29 -0700
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-08-15 13:26:37 +0300
commit1712cde28532d9b0c98142e08a131b344d3200bd (patch)
tree09e517cf72f8b286aa7ff6d1981035d69e88aef6 /drivers/mtd/mtdswap.c
parent93ee7a9340d64f20295aacc3fb6a22b759323280 (diff)
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.c3
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;