From: Michal Nazarewicz <mina86@mina86.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
H Hartley Sweeten <hsweeten@visionengravers.com>,
Ian Abbott <abbotti@mev.co.uk>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCHv2] staging: comedi: fix potentially uninitialised variable
Date: Mon, 11 Nov 2013 12:31:51 +0100 [thread overview]
Message-ID: <xa1t38n3yy1k.fsf@mina86.com> (raw)
In-Reply-To: <20131110212835.GB5302@mwanda>
If none of the if conditions take a true path, the ret variable will
never be assigned a value.
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
---
drivers/staging/comedi/drivers/vmk80xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
On Sun, Nov 10 2013, Dan Carpenter wrote:
> Don't use a From: unless you are sending it on behalf of another sender.
>
> You need a Signed-off-by line and it has to match your email address
> which you used to send the email.
Sorry about that, forgot about “-s”.
> Otherwise, the patch is good an fixes an important bug.
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c
index 933b01a..0adf3cf 100644
--- a/drivers/staging/comedi/drivers/vmk80xx.c
+++ b/drivers/staging/comedi/drivers/vmk80xx.c
@@ -465,7 +465,7 @@ static int vmk80xx_do_insn_bits(struct comedi_device *dev,
unsigned char *rx_buf = devpriv->usb_rx_buf;
unsigned char *tx_buf = devpriv->usb_tx_buf;
int reg, cmd;
- int ret;
+ int ret = 0;
if (devpriv->model == VMK8061_MODEL) {
reg = VMK8061_DO_REG;
--
1.8.3.2
prev parent reply other threads:[~2013-11-11 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 18:37 [PATCH] " Michal Nazarewicz
2013-11-10 21:28 ` Dan Carpenter
2013-11-11 11:31 ` Michal Nazarewicz [this message]
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=xa1t38n3yy1k.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=abbotti@mev.co.uk \
--cc=dan.carpenter@oracle.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome