qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>,
	Pavel Borzenkov <pavel.borzenkov@gmail.com>
Subject: [Qemu-devel] [PATCH 05/10] qed: remove unneeded variable assignment
Date: Wed, 26 Oct 2011 15:22:08 +0100	[thread overview]
Message-ID: <1319638933-19063-6-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1319638933-19063-1-git-send-email-stefanha@linux.vnet.ibm.com>

From: Pavel Borzenkov <pavel.borzenkov@gmail.com>

'ret' is unconditionally overwitten by qed_read_l1_table_sync()

Spotted by Clang Analyzer

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
 block/qed.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/block/qed.c b/block/qed.c
index 7fab155..e6720db 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -388,7 +388,6 @@ static int bdrv_qed_open(BlockDriverState *bs, int flags)
     if (ret < 0) {
         return ret;
     }
-    ret = 0; /* ret should always be 0 or -errno */
     qed_header_le_to_cpu(&le_header, &s->header);
 
     if (s->header.magic != QED_MAGIC) {
-- 
1.7.7

  parent reply	other threads:[~2011-10-26 14:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-26 14:22 [Qemu-devel] [PULL 00/10] Trivial patches for October 15 to 26 2011 Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 01/10] device_tree: Fix potential memory leak Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 02/10] vmdk: remove unneeded variable assignment Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 03/10] vmdk: vmdk_read_cid returns garbage if p_name is NULL Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 04/10] qed: don't pass NULL to memcpy Stefan Hajnoczi
2011-10-26 14:22 ` Stefan Hajnoczi [this message]
2011-10-26 14:22 ` [Qemu-devel] [PATCH 06/10] exec.c: Remove useless comment Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 07/10] tools: reorganize Makefile variables Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 08/10] Fix typo: buf -> bus Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 09/10] Documentation: fix typo Stefan Hajnoczi
2011-10-26 14:22 ` [Qemu-devel] [PATCH 10/10] ahci: fix DPRINTF format strings Stefan Hajnoczi
2011-10-31 16:52 ` [Qemu-devel] [PULL 00/10] Trivial patches for October 15 to 26 2011 Anthony Liguori

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=1319638933-19063-6-git-send-email-stefanha@linux.vnet.ibm.com \
    --to=stefanha@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=pavel.borzenkov@gmail.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).