Previous commit rendered 'cleanup' label and @ret variable
redundant. The same result can be achieved by returning 0/-1
directly.

Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
 src/qemu/qemu_driver.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index eac64bce70..4c32d969c7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12397,7 +12397,6 @@ qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
 {
     g_autoptr(qemuMonitorCPUModelInfo) info = NULL;
     size_t i;
-    int ret = -1;
 
     virCPUDefFreeModel(dst);
 
@@ -12412,13 +12411,10 @@ qemuConnectStealCPUModelFromInfo(virCPUDef *dst,
             continue;
 
         if (virCPUDefAddFeature(dst, name, VIR_CPU_FEATURE_REQUIRE) < 0)
-            goto cleanup;
+            return -1;
     }
 
-    ret = 0;
-
- cleanup:
-    return ret;
+    return 0;
 }
 
 
-- 
2.32.0

Reply via email to