Commit b0a2b6d8 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: check data length for INSN_CONFIG_DIGITAL_TRIG

The newly defined format for the `INSN_CONFIG_DIGITAL_TRIG`
configuration instruction expects 6 data values.  Check the length in
`check_insn_config_length()` before calling the comedi subdevice's
`insn_config` handler.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 33cdce62
...@@ -880,6 +880,10 @@ static int check_insn_config_length(struct comedi_insn *insn, ...@@ -880,6 +880,10 @@ static int check_insn_config_length(struct comedi_insn *insn,
if (insn->n == 5) if (insn->n == 5)
return 0; return 0;
break; 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 /* by default we allow the insn since we don't have checks for
* all possible cases yet */ * all possible cases yet */
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment