aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/comedi/comedi_fops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index ebdcecda3583..5e78c77d5a08 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -671,7 +671,7 @@ static int do_insnlist_ioctl(struct comedi_device *dev,
671 } 671 }
672 672
673 insns = 673 insns =
674 kmalloc(sizeof(struct comedi_insn) * insnlist.n_insns, GFP_KERNEL); 674 kcalloc(insnlist.n_insns, sizeof(struct comedi_insn), GFP_KERNEL);
675 if (!insns) { 675 if (!insns) {
676 DPRINTK("kmalloc failed\n"); 676 DPRINTK("kmalloc failed\n");
677 ret = -ENOMEM; 677 ret = -ENOMEM;