All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Abbott <abbotti@mev.co.uk>
To: Christian Engelmayer <cengelma@gmx.at>, <devel@driverdev.osuosl.org>
Cc: <hsweeten@visionengravers.com>, <gregkh@linuxfoundation.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: comedi: ii_pci20kc: fix usage of uninit scalar in ii20k_attach()
Date: Sun, 4 May 2014 11:16:48 +0100	[thread overview]
Message-ID: <53661390.708@mev.co.uk> (raw)
In-Reply-To: <20140504022609.7b1ba9c1@spike>

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         )=-

  reply	other threads:[~2014-05-04 10:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-05-23 12:17 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53661390.708@mev.co.uk \
    --to=abbotti@mev.co.uk \
    --cc=cengelma@gmx.at \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.