]> err.no Git - linux-2.6/commitdiff
[SCSI] ibmvscsi: convert kmalloc + memset to kcalloc
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Fri, 7 Apr 2006 10:10:03 +0000 (19:10 +0900)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 14 Apr 2006 20:50:04 +0000 (15:50 -0500)
Convert kmalloc + memset to kcalloc in ibmvscsi

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Dave Boutcher <sleddog@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/ibmvscsi/ibmvscsi.c

index 0a8ad37ae8998407528f8c710e9ecb9b1cb82828..12cb743d0ce531dc38c9b476c2353f2e45ed9810 100644 (file)
@@ -121,10 +121,9 @@ static int initialize_event_pool(struct event_pool *pool,
 
        pool->size = size;
        pool->next = 0;
-       pool->events = kmalloc(pool->size * sizeof(*pool->events), GFP_KERNEL);
+       pool->events = kcalloc(pool->size, sizeof(*pool->events), GFP_KERNEL);
        if (!pool->events)
                return -ENOMEM;
-       memset(pool->events, 0x00, pool->size * sizeof(*pool->events));
 
        pool->iu_storage =
            dma_alloc_coherent(hostdata->dev,