mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 23:24:22 -04:00
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>
This commit is contained in:
parent
92271551b6
commit
f4a8f52889
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue