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

View File

@@ -91,12 +91,10 @@ void dm_put_hw_handler(struct hw_handler_type *hwht)
static struct hwh_internal *_alloc_hw_handler(struct hw_handler_type *hwht)
{
struct hwh_internal *hwhi = kmalloc(sizeof(*hwhi), GFP_KERNEL);
struct hwh_internal *hwhi = kzalloc(sizeof(*hwhi), GFP_KERNEL);
if (hwhi) {
memset(hwhi, 0, sizeof(*hwhi));
if (hwhi)
hwhi->hwht = *hwht;
}
return hwhi;
}