From: Andrea Bolognani Date: Tue, 4 Jun 2019 12:37:18 +0000 (+0200) Subject: qemu: Drop cleanup label from qemuProcessInitCpuAffinity() X-Git-Tag: v5.5.0-rc1~338 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de563ebcf9d72e5815933a0d715aa9c462bf50cc;p=thirdparty%2Flibvirt.git qemu: Drop cleanup label from qemuProcessInitCpuAffinity() 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 --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 7d48c95973..42a6271411 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2463,7 +2463,6 @@ qemuProcessGetAllCpuAffinity(virBitmapPtr *cpumapRet) static int qemuProcessInitCpuAffinity(virDomainObjPtr vm) { - int ret = -1; VIR_AUTOPTR(virBitmap) cpumapToSet = NULL; virDomainNumatuneMemMode mem_mode; qemuDomainObjPrivatePtr priv = vm->privateData; @@ -2494,25 +2493,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; } #else /* !defined(HAVE_SCHED_GETAFFINITY) && !defined(HAVE_BSD_CPU_AFFINITY) */ static int