From dea07e831c50f648e7eaf5706713ecbdf9de813a Mon Sep 17 00:00:00 2001 Message-Id: From: Andrea Bolognani Date: Fri, 7 Jun 2019 11:59:08 +0200 Subject: [PATCH] qemu: Drop cleanup label from qemuProcessInitCpuAffinity() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're using VIR_AUTOPTR() for everything now, plus the cleanup section was not doing anything useful anyway. Signed-off-by: Andrea Bolognani Reviewed-by: Ján Tomko (cherry picked from commit de563ebcf9d72e5815933a0d715aa9c462bf50cc) https://bugzilla.redhat.com/show_bug.cgi?id=1718172 Signed-off-by: Andrea Bolognani Message-Id: <20190607095909.5538-2-abologna@redhat.com> Reviewed-by: Ján Tomko --- src/qemu/qemu_process.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f77c2ad275..f68a345c54 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2356,7 +2356,6 @@ qemuProcessGetAllCpuAffinity(virBitmapPtr *cpumapRet) static int qemuProcessInitCpuAffinity(virDomainObjPtr vm) { - int ret = -1; VIR_AUTOPTR(virBitmap) cpumapToSet = NULL; virDomainNumatuneMemMode mem_mode; qemuDomainObjPrivatePtr priv = vm->privateData; @@ -2387,25 +2386,24 @@ qemuProcessInitCpuAffinity(virDomainObjPtr vm) priv->autoNodeset, &nodeset, -1) < 0) - goto cleanup; + return -1; if (virNumaNodesetToCPUset(nodeset, &cpumapToSet) < 0) - goto cleanup; + return -1; } else if (vm->def->cputune.emulatorpin) { if (virBitmapCopy(cpumapToSet, vm->def->cputune.emulatorpin) < 0) - goto cleanup; + return -1; } else { if (qemuProcessGetAllCpuAffinity(&cpumapToSet) < 0) - goto cleanup; + return -1; } if (cpumapToSet && - virProcessSetAffinity(vm->pid, cpumapToSet) < 0) - goto cleanup; + virProcessSetAffinity(vm->pid, cpumapToSet) < 0) { + return -1; + } - ret = 0; - cleanup: - return ret; + return 0; } /* set link states to down on interfaces at qemu start */ -- 2.21.0