render / rpms / libvirt

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