Skip to content

Commit

Permalink
mtd: convert vmalloc/memset to vzalloc
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
  • Loading branch information
Joe Perches authored and Artem Bityutskiy committed Aug 15, 2011
1 parent 93ee7a9 commit 1712cde
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mtd/mtdswap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1712cde

Please sign in to comment.