dm: use vzalloc
Use vzalloc() instead of vmalloc()+memset(). Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
committed by
Alasdair G Kergon
parent
6c9b27ab08
commit
e29e65aacb
@@ -174,10 +174,9 @@ static int alloc_area(struct pstore *ps)
|
||||
if (!ps->area)
|
||||
goto err_area;
|
||||
|
||||
ps->zero_area = vmalloc(len);
|
||||
ps->zero_area = vzalloc(len);
|
||||
if (!ps->zero_area)
|
||||
goto err_zero_area;
|
||||
memset(ps->zero_area, 0, len);
|
||||
|
||||
ps->header_area = vmalloc(len);
|
||||
if (!ps->header_area)
|
||||
|
||||
Reference in New Issue
Block a user