]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/md/dm-hw-handler.c
dm: use kzalloc
[net-next-2.6.git] / drivers / md / dm-hw-handler.c
index baafaaba4d4b5632d177f1a3e1f8cb374de1119c..2ee84d8aa0bf754244196d9189b04a10a99f2461 100644 (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;
 }