fbe740
From eaf5a1634e29eb3c4c3267b7724038049dacadc7 Mon Sep 17 00:00:00 2001
fbe740
Message-Id: <eaf5a1634e29eb3c4c3267b7724038049dacadc7@dist-git>
fbe740
From: Peter Krempa <pkrempa@redhat.com>
fbe740
Date: Wed, 19 Feb 2020 15:09:55 +0100
fbe740
Subject: [PATCH] virDomainDiskAddISCSIPoolSourceHost: Remove 'cleanup' label
fbe740
MIME-Version: 1.0
fbe740
Content-Type: text/plain; charset=UTF-8
fbe740
Content-Transfer-Encoding: 8bit
fbe740
fbe740
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
(cherry picked from commit 4d5093ef75efdf87a941ffd3fbc1d974e031a0a3)
fbe740
fbe740
https://bugzilla.redhat.com/show_bug.cgi?id=1804603
fbe740
Message-Id: <da07ec7957e5c8f502c43bf0542a0d42ae1f62ee.1582120424.git.pkrempa@redhat.com>
fbe740
Reviewed-by: Ján Tomko <jtomko@redhat.com>
fbe740
---
fbe740
 src/conf/domain_conf.c | 12 ++++--------
fbe740
 1 file changed, 4 insertions(+), 8 deletions(-)
fbe740
fbe740
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
fbe740
index f0365329c6..436d094578 100644
fbe740
--- a/src/conf/domain_conf.c
fbe740
+++ b/src/conf/domain_conf.c
fbe740
@@ -31173,7 +31173,6 @@ static int
fbe740
 virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
fbe740
                                     virStoragePoolDefPtr pooldef)
fbe740
 {
fbe740
-    int ret = -1;
fbe740
     VIR_AUTOSTRINGLIST tokens = NULL;
fbe740
     size_t ntokens;
fbe740
 
fbe740
@@ -31181,7 +31180,7 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
fbe740
     if (pooldef->source.nhost != 1) {
fbe740
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
fbe740
                        _("Expected exactly 1 host for the storage pool"));
fbe740
-        goto cleanup;
fbe740
+        return -1;
fbe740
     }
fbe740
 
fbe740
     /* iscsi pool only supports one host */
fbe740
@@ -31195,13 +31194,13 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
fbe740
 
fbe740
     /* iscsi volume has name like "unit:0:0:1" */
fbe740
     if (!(tokens = virStringSplitCount(def->src->srcpool->volume, ":", 0, &ntokens)))
fbe740
-        goto cleanup;
fbe740
+        return -1;
fbe740
 
fbe740
     if (ntokens != 4) {
fbe740
         virReportError(VIR_ERR_INTERNAL_ERROR,
fbe740
                        _("unexpected iscsi volume name '%s'"),
fbe740
                        def->src->srcpool->volume);
fbe740
-        goto cleanup;
fbe740
+        return -1;
fbe740
     }
fbe740
 
fbe740
     /* iscsi pool has only one source device path */
fbe740
@@ -31216,10 +31215,7 @@ virDomainDiskAddISCSIPoolSourceHost(virDomainDiskDefPtr def,
fbe740
 
fbe740
     def->src->protocol = VIR_STORAGE_NET_PROTOCOL_ISCSI;
fbe740
 
fbe740
-    ret = 0;
fbe740
-
fbe740
- cleanup:
fbe740
-    return ret;
fbe740
+    return 0;
fbe740
 }
fbe740
 
fbe740
 
fbe740
-- 
fbe740
2.25.0
fbe740