mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Haverkamp <haver@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@linuxfoundation.org, arnd@arndb.de,
	cody@linux.vnet.ibm.com, schwidefsky@de.ibm.com,
	utz.bacher@de.ibm.com, jsvogt@de.ibm.com, MIJUNG@de.ibm.com,
	cascardo@linux.vnet.ibm.com, michael@ibmra.de,
	colin.king@canonical.com, bjking1@us.ibm.com, esa@de.ibm.com,
	haver@linux.vnet.ibm.com
Subject: [PATCH 3/5] GenWQE: Ensure rc is not returning an uninitialized value
Date: Thu, 20 Mar 2014 15:11:04 +0100	[thread overview]
Message-ID: <1395324666-27153-3-git-send-email-haver@linux.vnet.ibm.com> (raw)
In-Reply-To: <1395324666-27153-1-git-send-email-haver@linux.vnet.ibm.com>

From: Colin Ian King <colin.king@canonical.com>

rc is not initialized, so genwqe_finish_queue() either returns -EIO or
garbage.  Fortunately the return is not being checked by any callers,
so this has not yet caused any problems. Even so, it makes sense to
fix this small bug in case is is checked in future.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
---
 drivers/misc/genwqe/card_ddcb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/misc/genwqe/card_ddcb.c
+++ b/drivers/misc/genwqe/card_ddcb.c
@@ -1310,7 +1310,7 @@ static int queue_wake_up_all(struct genw
  */
 int genwqe_finish_queue(struct genwqe_dev *cd)
 {
-	int i, rc, in_flight;
+	int i, rc = 0, in_flight;
 	int waitmax = genwqe_ddcb_software_timeout;
 	struct pci_dev *pci_dev = cd->pci_dev;
 	struct ddcb_queue *queue = &cd->queue;


  parent reply	other threads:[~2014-03-20 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-20 14:11 [PATCH 1/5] GenWQE: Enable access to VPD flash area Frank Haverkamp
2014-03-20 14:11 ` [PATCH 2/5] GenWQE: Add wmb before DDCB is started Frank Haverkamp
2014-03-20 14:11 ` Frank Haverkamp [this message]
2014-03-20 14:11 ` [PATCH 4/5] GenWQE: Fix multithreading problems Frank Haverkamp
2014-03-20 14:11 ` [PATCH 5/5] GenWQE: Increase driver version number Frank Haverkamp

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=1395324666-27153-3-git-send-email-haver@linux.vnet.ibm.com \
    --to=haver@linux.vnet.ibm.com \
    --cc=MIJUNG@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=bjking1@us.ibm.com \
    --cc=cascardo@linux.vnet.ibm.com \
    --cc=cody@linux.vnet.ibm.com \
    --cc=colin.king@canonical.com \
    --cc=esa@de.ibm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jsvogt@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@ibmra.de \
    --cc=schwidefsky@de.ibm.com \
    --cc=utz.bacher@de.ibm.com \
    /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

all inboxes | Powered by JetHome®