staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
authorChristian Engelmayer <cengelma@gmx.at>
Wed, 7 May 2014 19:45:52 +0000 (21:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 May 2014 12:28:16 +0000 (21:28 +0900)
commit27a2234edd4a5c8b0ebdaaa3f6a5f00183f3154f
tree9687c455f6818aec2f248b03e3a2cc7d34e280d7
parent55292b3d543a313aee456b3acb4cb0290ca2977c
staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()

This driver supports the PCI-20001C-1a and PCI-20001C-2a carrier boards.
The -2a version has 32 on-board DIO channels. In case this variant is
detected, local variable 'has_dio' is set accordingly. Otherwise it is
left uninitialized and the following subdevice instantiation depends on
the stack. Detected by Coverity - CID 1077830.

Signed-off-by: Christian Engelmayer <cengelma@gmx.at>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ii_pci20kc.c