Blame SOURCES/kvm-qcow2-Remove-dead-check-on-ret.patch

1bdc94
From 3e96785b4f89d97ca8297e2ea4ed2458409422ec Mon Sep 17 00:00:00 2001
1bdc94
From: John Snow <jsnow@redhat.com>
1bdc94
Date: Wed, 18 Jul 2018 22:54:48 +0200
1bdc94
Subject: [PATCH 63/89] qcow2: Remove dead check on !ret
1bdc94
MIME-Version: 1.0
1bdc94
Content-Type: text/plain; charset=UTF-8
1bdc94
Content-Transfer-Encoding: 8bit
1bdc94
1bdc94
RH-Author: John Snow <jsnow@redhat.com>
1bdc94
Message-id: <20180718225511.14878-13-jsnow@redhat.com>
1bdc94
Patchwork-id: 81409
1bdc94
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 12/35] qcow2: Remove dead check on !ret
1bdc94
Bugzilla: 1207657
1bdc94
RH-Acked-by: Eric Blake <eblake@redhat.com>
1bdc94
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
1bdc94
RH-Acked-by: Fam Zheng <famz@redhat.com>
1bdc94
1bdc94
From: Fam Zheng <famz@redhat.com>
1bdc94
1bdc94
In the beginning of the function, we initialize the local variable to 0,
1bdc94
and in the body of the function, we check the assigned values and exit
1bdc94
the loop immediately. So here it can never be non-zero.
1bdc94
1bdc94
Reported-by: Kevin Wolf <kwolf@redhat.com>
1bdc94
Signed-off-by: Fam Zheng <famz@redhat.com>
1bdc94
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
1bdc94
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
1bdc94
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
1bdc94
(cherry picked from commit 354d930dc6e90e97599459b79c071ff1b93e433b)
1bdc94
Signed-off-by: John Snow <jsnow@redhat.com>
1bdc94
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
1bdc94
---
1bdc94
 block/qcow2.c | 2 +-
1bdc94
 1 file changed, 1 insertion(+), 1 deletion(-)
1bdc94
1bdc94
diff --git a/block/qcow2.c b/block/qcow2.c
1bdc94
index c5341a4..e171a99 100644
1bdc94
--- a/block/qcow2.c
1bdc94
+++ b/block/qcow2.c
1bdc94
@@ -1772,7 +1772,7 @@ static coroutine_fn int qcow2_handle_l2meta(BlockDriverState *bs,
1bdc94
     while (l2meta != NULL) {
1bdc94
         QCowL2Meta *next;
1bdc94
 
1bdc94
-        if (!ret && link_l2) {
1bdc94
+        if (link_l2) {
1bdc94
             ret = qcow2_alloc_cluster_link_l2(bs, l2meta);
1bdc94
             if (ret) {
1bdc94
                 goto out;
1bdc94
-- 
1bdc94
1.8.3.1
1bdc94