From: Miguel Bernal Marin Date: Thu, 16 Mar 2017 06:58:23 +0000 (-0600) Subject: scsi: storvsc: Prefer kcalloc over kzalloc with multiply X-Git-Tag: v4.12-rc1~99^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e04085285b829dc922e78768a9abb390a8caed31;p=platform%2Fkernel%2Flinux-exynos.git 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 Reviewed-by: K. Y. Srinivasan Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 638e5f4..3d70d1cf 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;