diff options
author | Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | 2017-03-16 00:58:23 -0600 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-04-13 23:04:02 -0400 |
commit | e04085285b829dc922e78768a9abb390a8caed31 (patch) | |
tree | 65f049376fe128337a53046d2bfa05148127a2e6 /drivers/scsi/storvsc_drv.c | |
parent | 1dd0c0e4fd02dc5e5bfaf89bd4656aabe4ae3cb3 (diff) | |
download | linux-e04085285b829dc922e78768a9abb390a8caed31.tar.gz linux-e04085285b829dc922e78768a9abb390a8caed31.tar.bz2 linux-e04085285b829dc922e78768a9abb390a8caed31.zip |
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>
Diffstat (limited to 'drivers/scsi/storvsc_drv.c')
-rw-r--r-- | drivers/scsi/storvsc_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 638e5f427c90..3d70d1cf49a3 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -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; |