dm raid1: use list_split_init
[safe/jmp/linux-2.6] / drivers / md / dm-emc.c
index 3425172..6b91b9a 100644 (file)
@@ -81,7 +81,7 @@ static struct bio *get_failover_bio(struct dm_path *path, unsigned data_size)
        }
 
        if (bio_add_page(bio, page, data_size, 0) != data_size) {
-               DMERR("get_failover_bio: alloc_page() failed.");
+               DMERR("get_failover_bio: bio_add_page() failed.");
                __free_page(page);
                bio_put(bio);
                return NULL;
@@ -211,12 +211,10 @@ fail_path:
 
 static struct emc_handler *alloc_emc_handler(void)
 {
-       struct emc_handler *h = kmalloc(sizeof(*h), GFP_KERNEL);
+       struct emc_handler *h = kzalloc(sizeof(*h), GFP_KERNEL);
 
-       if (h) {
-               memset(h, 0, sizeof(*h));
+       if (h)
                spin_lock_init(&h->lock);
-       }
 
        return h;
 }