* [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
@ 2014-05-04 0:26 Christian Engelmayer
2014-05-04 10:16 ` Ian Abbott
2014-05-23 12:17 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Christian Engelmayer @ 2014-05-04 0:26 UTC (permalink / raw)
To: devel; +Cc: hsweeten, abbotti, gregkh, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]
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>
---
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
2014-05-04 0:26 [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach() Christian Engelmayer
@ 2014-05-04 10:16 ` Ian Abbott
2014-05-23 12:17 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2014-05-04 10:16 UTC (permalink / raw)
To: Christian Engelmayer, devel; +Cc: hsweeten, gregkh, linux-kernel
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 <cengelma@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 <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] 3+ messages in thread
* Re: [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
2014-05-04 0:26 [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach() Christian Engelmayer
2014-05-04 10:16 ` Ian Abbott
@ 2014-05-23 12:17 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2014-05-23 12:17 UTC (permalink / raw)
To: Christian Engelmayer; +Cc: devel, abbotti, linux-kernel
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 <cengelma@gmx.at>
> Reviewed-by: Ian Abbott <abbotti@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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-23 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-04 0:26 [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach() Christian Engelmayer
2014-05-04 10:16 ` Ian Abbott
2014-05-23 12:17 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.