Files
linux/drivers
Peter Huewe fc9ca48eb6 staging/comedi: Fix undefined array subscript
In vmk80xx_do_insn_bits the local variable reg, which is used as an
index to the tx_buf array, can be used uninitialized if
- data[0] == 0
and
- devpriv->model != VMK8061_MODEL
-> we get into the else branch without having reg initialized.

Since the driver usually differentiates between VMK8061_MODEL and
VMK8055_MODEL it's safe to assume that VMK8055_DO_REG was meant as an
initial value.

And to avoid duplication we can move the assignments to the top.

Acked-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-13 09:33:38 -08:00
..
2013-02-10 17:42:43 +00:00
2012-12-18 15:19:06 +10:30
2013-01-25 21:25:02 -08:00
2013-01-16 15:57:54 +01:00
2013-01-15 10:45:26 -07:00
2012-11-16 08:14:18 -08:00
2012-11-16 08:14:18 -08:00