Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Eduardo Habkost <[email protected]>
---
v2:
- replace "if (error_is_set(&error))" with "if (error)"
---
target-i386/cpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index ab2d462..2d01705 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1427,7 +1427,8 @@ int cpu_x86_register(X86CPU *cpu, const char *cpu_model)
object_property_set_str(OBJECT(cpu), def->model_id, "model-id", &error);
out:
- if (error_is_set(&error)) {
+ if (error) {
+ fprintf(stderr, "%s\n", error_get_pretty(error));
error_free(error);
return -1;
}
--
1.7.11.7