vcsm: Fix "Prefer kcalloc over kzalloc with multiply"

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
This commit is contained in:
Dave Stevenson
2017-09-01 17:47:32 +01:00
committed by popcornmix
parent 2616cca572
commit b51a9b42bc

View File

@@ -2984,7 +2984,9 @@ static long vc_sm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
ret = -EFAULT; ret = -EFAULT;
goto out; goto out;
} }
block = kzalloc(ioparam.op_count * sizeof(struct vmcs_sm_ioctl_clean_invalid_block), GFP_KERNEL); block = kcalloc(ioparam.op_count,
sizeof(struct vmcs_sm_ioctl_clean_invalid_block),
GFP_KERNEL);
if (!block) { if (!block) {
ret = -EFAULT; ret = -EFAULT;
goto out; goto out;