Re: [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
On Sun, May 04, 2014 at 02:26:09AM +0200, Christian Engelmayer wrote: 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 cenge...@gmx.at Reviewed-by: Ian Abbott abbo...@mev.co.uk --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git It doesn't apply there at all for some odd reason, can you refresh it and resend? thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
On 04/05/14 01:26, Christian Engelmayer wrote: 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 cenge...@gmx.at --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/comedi/drivers/ii_pci20kc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index 3558ab3..2516ce8 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -461,6 +461,7 @@ static int ii20k_attach(struct comedi_device *dev, id = readb(devpriv-ioaddr + II20K_ID_REG); switch (id II20K_ID_MASK) { case II20K_ID_PCI20001C_1A: + has_dio = false; break; case II20K_ID_PCI20001C_2A: has_dio = true; ThanksĀ¬ Reviewed-by: Ian Abbott abbo...@mev.co.uk -- -=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] 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 cenge...@gmx.at --- Compile tested and applies against branch staging-next of tree git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git --- drivers/staging/comedi/drivers/ii_pci20kc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index 3558ab3..2516ce8 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -461,6 +461,7 @@ static int ii20k_attach(struct comedi_device *dev, id = readb(devpriv-ioaddr + II20K_ID_REG); switch (id II20K_ID_MASK) { case II20K_ID_PCI20001C_1A: + has_dio = false; break; case II20K_ID_PCI20001C_2A: has_dio = true; -- 1.9.1 signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel