Patchwork [05/10] qed: remove unneeded variable assignment

login
register
mail settings
Submitter Stefan Hajnoczi
Date Oct. 26, 2011, 2:22 p.m.
Message ID <1319638933-19063-6-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/121911/
State New
Headers show

Comments

Stefan Hajnoczi - Oct. 26, 2011, 2:22 p.m.
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(-)

Patch

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