Commit e0408528 authored by Miguel Bernal Marin's avatar Miguel Bernal Marin Committed by Martin K. Petersen

scsi: storvsc: Prefer kcalloc over kzalloc with multiply

Use kcalloc for allocating an array instead of kzalloc with multiply,
kcalloc is the preferred API.

Found with checkpatch.
Signed-off-by: default avatarMiguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Reviewed-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 1dd0c0e4
...@@ -866,7 +866,7 @@ static int storvsc_channel_init(struct hv_device *device, bool is_fc) ...@@ -866,7 +866,7 @@ static int storvsc_channel_init(struct hv_device *device, bool is_fc)
* We will however populate all the slots to evenly distribute * We will however populate all the slots to evenly distribute
* the load. * the load.
*/ */
stor_device->stor_chns = kzalloc(sizeof(void *) * num_possible_cpus(), stor_device->stor_chns = kcalloc(num_possible_cpus(), sizeof(void *),
GFP_KERNEL); GFP_KERNEL);
if (stor_device->stor_chns == NULL) if (stor_device->stor_chns == NULL)
return -ENOMEM; return -ENOMEM;
......
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