From nobody Sun Feb 8 20:53:37 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1553862421171511.5563470174642; Fri, 29 Mar 2019 05:27:01 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AF49CC057F31; Fri, 29 Mar 2019 12:26:59 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 874985D9D1; Fri, 29 Mar 2019 12:26:59 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 3FF913FB10; Fri, 29 Mar 2019 12:26:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x2TCQieA012022 for ; Fri, 29 Mar 2019 08:26:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22AF983E8A; Fri, 29 Mar 2019 12:26:44 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.229]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9F74183E89 for ; Fri, 29 Mar 2019 12:26:43 +0000 (UTC) From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 29 Mar 2019 13:26:33 +0100 Message-Id: <26c6338b1301f7d86eb731d91f855b9739d2ada5.1553862332.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/6] qemu: caps: Remove cleanup section in virQEMUCapsInitQMPMonitor X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 29 Mar 2019 12:27:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: Erik Skultety --- src/qemu/qemu_capabilities.c | 37 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e3db7ce71c..2127cfb85c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4320,7 +4320,6 @@ int virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, qemuMonitorPtr mon) { - int ret =3D -1; int major, minor, micro; VIR_AUTOFREE(char *) package =3D NULL; @@ -4331,7 +4330,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, &package) < 0) { VIR_DEBUG("Failed to query monitor version %s", virGetLastErrorMessage()); - goto cleanup; + return -1; } VIR_DEBUG("Got version %d.%d.%d (%s)", @@ -4343,7 +4342,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, _("QEMU version >=3D %d.%d.%d is required, but %d.%= d.%d found"), QEMU_MIN_MAJOR, QEMU_MIN_MINOR, QEMU_MIN_MICRO, major, minor, micro); - goto cleanup; + return -1; } qemuCaps->version =3D major * 1000000 + minor * 1000 + micro; @@ -4351,7 +4350,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, qemuCaps->usedQMP =3D true; if (virQEMUCapsInitQMPArch(qemuCaps, mon) < 0) - goto cleanup; + return -1; virQEMUCapsInitQMPBasicArch(qemuCaps); @@ -4359,40 +4358,38 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, virQEMUCapsInitQMPVersionCaps(qemuCaps); if (virQEMUCapsProbeQMPCommands(qemuCaps, mon) < 0) - goto cleanup; + return -1; /* Some capabilities may differ depending on KVM state */ if (virQEMUCapsProbeQMPKVMState(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPEvents(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPDevices(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPMachineTypes(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPCPUDefinitions(qemuCaps, mon, false) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPTPM(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPCommandLine(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPMigrationCapabilities(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPSchemaCapabilities(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPHostCPU(qemuCaps, mon, false) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPGICCapabilities(qemuCaps, mon) < 0) - goto cleanup; + return -1; if (virQEMUCapsProbeQMPSEVCapabilities(qemuCaps, mon) < 0) - goto cleanup; + return -1; virQEMUCapsInitProcessCaps(qemuCaps); - ret =3D 0; - cleanup: - return ret; + return 0; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list