Skip to content

Commit

Permalink
[SCSI] ibmvscsi: convert kmalloc + memset to kcalloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 14, 2006
1 parent 84d891d commit 4c021dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/ibmvscsi/ibmvscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4c021dd

Please sign in to comment.