Skip to content

Commit 4c021dd

Browse files
fujitaJames Bottomley
authored andcommitted
[SCSI] ibmvscsi: convert kmalloc + memset to kcalloc
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>
1 parent 84d891d commit 4c021dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/scsi/ibmvscsi/ibmvscsi.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,9 @@ static int initialize_event_pool(struct event_pool *pool,
121121

122122
pool->size = size;
123123
pool->next = 0;
124-
pool->events = kmalloc(pool->size * sizeof(*pool->events), GFP_KERNEL);
124+
pool->events = kcalloc(pool->size, sizeof(*pool->events), GFP_KERNEL);
125125
if (!pool->events)
126126
return -ENOMEM;
127-
memset(pool->events, 0x00, pool->size * sizeof(*pool->events));
128127

129128
pool->iu_storage =
130129
dma_alloc_coherent(hostdata->dev,

0 commit comments

Comments
 (0)