提交 4c021dd1 编写于 作者: F FUJITA Tomonori 提交者: James Bottomley

[SCSI] ibmvscsi: convert kmalloc + memset to kcalloc

Convert kmalloc + memset to kcalloc in ibmvscsi
Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: NDave Boutcher <sleddog@us.ibm.com>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 84d891d6
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册