diff options
author | Joe Perches <joe@perches.com> | 2011-05-28 13:36:29 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-08-15 06:26:37 -0400 |
commit | 1712cde28532d9b0c98142e08a131b344d3200bd (patch) | |
tree | 09e517cf72f8b286aa7ff6d1981035d69e88aef6 /drivers/mtd/mtdswap.c | |
parent | 93ee7a9340d64f20295aacc3fb6a22b759323280 (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.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, | |||
1374 | goto revmap_fail; | 1374 | goto revmap_fail; |
1375 | 1375 | ||
1376 | eblk_bytes = sizeof(struct swap_eb)*d->eblks; | 1376 | eblk_bytes = sizeof(struct swap_eb)*d->eblks; |
1377 | d->eb_data = vmalloc(eblk_bytes); | 1377 | d->eb_data = vzalloc(eblk_bytes); |
1378 | if (!d->eb_data) | 1378 | if (!d->eb_data) |
1379 | goto eb_data_fail; | 1379 | goto eb_data_fail; |
1380 | 1380 | ||
1381 | memset(d->eb_data, 0, eblk_bytes); | ||
1382 | for (i = 0; i < pages; i++) | 1381 | for (i = 0; i < pages; i++) |
1383 | d->page_data[i] = BLOCK_UNDEF; | 1382 | d->page_data[i] = BLOCK_UNDEF; |
1384 | 1383 | ||