* [PATCH v2] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
@ 2014-05-07 19:45 Christian Engelmayer
2014-05-19 16:51 ` Ian Abbott
0 siblings, 1 reply; 2+ messages in thread
From: Christian Engelmayer @ 2014-05-07 19:45 UTC (permalink / raw)
To: devel; +Cc: hsweeten, abbotti, gregkh, linux-kernel
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>
---
v2: Resend after v1 failed to apply
* rebased against staging-next - commit 09c3fbba (staging: rtl8188eu:
Remove 'u8 *pbuf' from struct recv_buf)
* fixed mua: no multipart, 7bit text/plain us-ascii
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
2014-05-07 19:45 [PATCH v2] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach() Christian Engelmayer
@ 2014-05-19 16:51 ` Ian Abbott
0 siblings, 0 replies; 2+ messages in thread
From: Ian Abbott @ 2014-05-19 16:51 UTC (permalink / raw)
To: Christian Engelmayer, devel@driverdev.osuosl.org
Cc: hsweeten@visionengravers.com, Ian Abbott,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org
On 2014-05-07 20:45, 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 <cengelma@gmx.at>
> ---
> v2: Resend after v1 failed to apply
>
> * rebased against staging-next - commit 09c3fbba (staging: rtl8188eu:
> Remove 'u8 *pbuf' from struct recv_buf)
> * fixed mua: no multipart, 7bit text/plain us-ascii
>
> 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(+)
Thanks!
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-19 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-07 19:45 [PATCH v2] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach() Christian Engelmayer
2014-05-19 16:51 ` Ian Abbott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox