summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChase Southwood <chase.southwood@gmail.com>2015-01-19 20:42:49 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-25 19:59:09 +0800
commitbff776931e6589192f07f22e1ec17b8eb878bd1a (patch)
treec6c058f14b055227a4a058365e8ab5d7eb115fff
parentb15f0277d75530d0c2e77c9dc7bc22dca137cf18 (diff)
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>
-rw-r--r--drivers/staging/comedi/drivers/das1800.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/das1800.c b/drivers/staging/comedi/drivers/das1800.c
index 381ae9440ab2..13ed31cebb7e 100644
--- a/drivers/staging/comedi/drivers/das1800.c
+++ b/drivers/staging/comedi/drivers/das1800.c
@@ -1374,7 +1374,7 @@ static int das1800_attach(struct comedi_device *dev,
if (dev->irq & it->options[2])
das1800_init_dma(dev, it);
- devpriv->fifo_buf = kmalloc(FIFO_SIZE * sizeof(uint16_t), GFP_KERNEL);
+ devpriv->fifo_buf = kmalloc_array(FIFO_SIZE, sizeof(uint16_t), GFP_KERNEL);
if (!devpriv->fifo_buf)
return -ENOMEM;