From: Wolfgang Ocker Date: Mon, 2 Jun 2014 20:48:06 +0000 (+0200) Subject: staging: comedi: style - use kmalloc_array(n, s, ...) instead of kmalloc(n*s, ...) X-Git-Tag: v3.17-rc1~123^2~1965 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f4a8f5288929e11c0e393d14e59eee1cca2c8ae4;p=karo-tx-linux.git staging: comedi: style - use kmalloc_array(n, s, ...) instead of kmalloc(n*s, ...) Fix a style issue reported by checkpatch.pl for the Eudyptula challenge Signed-off-by: Wolfgang Ocker Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 9d99fb3c18a6..c54ed42f8310 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -1295,7 +1295,7 @@ static int do_insnlist_ioctl(struct comedi_device *dev, if (copy_from_user(&insnlist, arg, sizeof(insnlist))) return -EFAULT; - data = kmalloc(sizeof(unsigned int) * MAX_SAMPLES, GFP_KERNEL); + data = kmalloc_array(MAX_SAMPLES, sizeof(unsigned int), GFP_KERNEL); if (!data) { ret = -ENOMEM; goto error; @@ -1376,7 +1376,7 @@ static int do_insn_ioctl(struct comedi_device *dev, unsigned int *data = NULL; int ret = 0; - data = kmalloc(sizeof(unsigned int) * MAX_SAMPLES, GFP_KERNEL); + data = kmalloc_array(MAX_SAMPLES, sizeof(unsigned int), GFP_KERNEL); if (!data) { ret = -ENOMEM; goto error;