Commit 4c021dd1 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by James Bottomley

[SCSI] ibmvscsi: convert kmalloc + memset to kcalloc

Convert kmalloc + memset to kcalloc in ibmvscsi
Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: default avatarDave Boutcher <sleddog@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 84d891d6
...@@ -121,10 +121,9 @@ static int initialize_event_pool(struct event_pool *pool, ...@@ -121,10 +121,9 @@ static int initialize_event_pool(struct event_pool *pool,
pool->size = size; pool->size = size;
pool->next = 0; 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) if (!pool->events)
return -ENOMEM; return -ENOMEM;
memset(pool->events, 0x00, pool->size * sizeof(*pool->events));
pool->iu_storage = pool->iu_storage =
dma_alloc_coherent(hostdata->dev, dma_alloc_coherent(hostdata->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment