提交 1712cde2 编写于 作者: J Joe Perches 提交者: Artem Bityutskiy

mtd: convert vmalloc/memset to vzalloc

Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 93ee7a93
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册