dm: use kzalloc

Convert kmalloc() + memset() to kzalloc().

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
This commit is contained in:
Dmitry Monakhov
2007-10-19 22:38:51 +01:00
committed by Alasdair G Kergon
parent 6f3c3f0afa
commit 094262db9e
5 changed files with 9 additions and 18 deletions
+2 -4
View File
@@ -94,12 +94,10 @@ out:
static struct ps_internal *_alloc_path_selector(struct path_selector_type *pst)
{
struct ps_internal *psi = kmalloc(sizeof(*psi), GFP_KERNEL);
struct ps_internal *psi = kzalloc(sizeof(*psi), GFP_KERNEL);
if (psi) {
memset(psi, 0, sizeof(*psi));
if (psi)
psi->pst = *pst;
}
return psi;
}