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

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