[PATCH 0/4] staging: comedi: ni_mio_common: Don't assume insn->n is 1
Ian Abbott
abbotti at mev.co.uk
Tue Mar 19 16:54:40 UTC 2019
For insn_read and insn_write handlers for the EEPROM and calibration
subdevices currently assume that insn->n is 1 and access data[0] without
checking insn->n. data[0] exists because the Comedi core ensures it,
but in the case of the insn_write handler it will contain some random,
uninitialized value.
These patches change the handlers to follow the usual Comedi
conventions.
1) staging: comedi: ni_mio_common: Use insn->n in ni_calib_insn_write()
2) staging: comedi: ni_mio_common: use insn->n in ni_calib_insn_read()
3) staging: comedi: ni_mio_common: use insn->n in ni_eeprom_insn_read()
4) staging: comedi: ni_mio_common: use insn->n in
ni_m_series_eeprom_insn_read()
drivers/staging/comedi/drivers/ni_mio_common.c | 30 +++++++++++++++++++-------
1 file changed, 22 insertions(+), 8 deletions(-)
More information about the devel
mailing list