summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi
diff options
context:
space:
mode:
authorWolfgang Ocker <weo@weo1.de>2014-06-02 20:48:06 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-06-18 22:04:20 (GMT)
commitf4a8f5288929e11c0e393d14e59eee1cca2c8ae4 (patch)
tree671067d855796a7ccc62a831aa32f7943be886a3 /drivers/staging/comedi
parent92271551b60318da442a5f22c5d9c6b99b98fba4 (diff)
downloadlinux-f4a8f5288929e11c0e393d14e59eee1cca2c8ae4.tar.xz
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 <weo@weo1.de> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r--drivers/staging/comedi/comedi_fops.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 9d99fb3..c54ed42 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;