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: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
Reviewed-by:  K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Miguel Bernal Marin 2017-03-16 00:58:23 -06:00 committed by Martin K. Petersen
parent 1dd0c0e4fd
commit e04085285b
1 changed files with 1 additions and 1 deletions

View File

@ -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
* the load.
*/
stor_device->stor_chns = kzalloc(sizeof(void *) * num_possible_cpus(),
stor_device->stor_chns = kcalloc(num_possible_cpus(), sizeof(void *),
GFP_KERNEL);
if (stor_device->stor_chns == NULL)
return -ENOMEM;