diff mbox

[v4,25/33] target-i386: Move error handling to end of x86_cpu_parse_featurestr()

Message ID 1408044362-11621-26-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost Aug. 14, 2014, 7:25 p.m. UTC
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target-i386/cpu.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 6d008ab..c093168 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1822,8 +1822,7 @@  static void x86_cpu_parse_featurestr(CPUState *cs, char *features,
             object_property_parse(OBJECT(cpu), "on", featurestr, &local_err);
         }
         if (local_err) {
-            error_propagate(errp, local_err);
-            return;
+            goto out;
         }
         featurestr = strtok(NULL, ",");
     }
@@ -1832,6 +1831,11 @@  static void x86_cpu_parse_featurestr(CPUState *cs, char *features,
         env->features[w] |= plus_features[w];
         env->features[w] &= ~minus_features[w];
     }
+
+out:
+    if (local_err) {
+        error_propagate(errp, local_err);
+    }
 }
 
 /* generate a composite string into buf of all cpuid names in featureset