Skip to content

Commit bff7769

Browse files
csouth3gregkh
authored andcommitted
staging: comedi: das1800: prefer kmalloc_array over kmalloc with multiply
Checkpatch doesn't like kmalloc with multiply very much: drivers/staging/comedi/drivers/das1800.c:1377: WARNING: Prefer kmalloc_array over kmalloc with multiply So this patch swaps that use out for kmalloc_array instead. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b15f027 commit bff7769

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/staging/comedi/drivers/das1800.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ static int das1800_attach(struct comedi_device *dev,
13741374
if (dev->irq & it->options[2])
13751375
das1800_init_dma(dev, it);
13761376

1377-
devpriv->fifo_buf = kmalloc(FIFO_SIZE * sizeof(uint16_t), GFP_KERNEL);
1377+
devpriv->fifo_buf = kmalloc_array(FIFO_SIZE, sizeof(uint16_t), GFP_KERNEL);
13781378
if (!devpriv->fifo_buf)
13791379
return -ENOMEM;
13801380

0 commit comments

Comments
 (0)