libvirt/SOURCES/libvirt-virDomainDiskAddISCSIPoolSourceHost-Remove-cleanup-label.patch
2021-09-10 11:58:15 +00:00

73 lines
2.3 KiB
Diff

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