From b593378c9f5cc1a24a81b3f4cac6872f384a6798 Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Thu, 21 Mar 2013 16:21:52 +0000 Subject: [PATCH] comedi/comedi_fops.c: Check length of INSN_CONFIG_DIGITAL_TRIG data `check_insn_config_length()` checks the data length for instructions we know about. Expect 6 data values for the INSN_CONFIG_DIGITAL_TRIG instruction. None of our drivers support this instruction yet. Signed-off-by: Ian Abbott --- comedi/comedi_fops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 2a7499be..e34b6e1b 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -812,6 +812,10 @@ static int check_insn_config_length(comedi_insn * insn, lsampl_t * data) if (insn->n == 5) return 0; break; + case INSN_CONFIG_DIGITAL_TRIG: + if (insn->n == 6) + return 0; + break; //by default we allow the insn since we don't have checks for all possible cases yet default: rt_printk -- 2.26.2