summary refs log tree commit diff stats
path: root/linux-user/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-user/main.c')
-rw-r--r--linux-user/main.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/linux-user/main.c b/linux-user/main.c
index 111c1ffafc..d92702a734 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3453,17 +3453,10 @@ CPUArchState *cpu_copy(CPUArchState *env)
 {
     CPUState *cpu = ENV_GET_CPU(env);
     CPUArchState *new_env = cpu_init(cpu_model);
-    CPUState *new_cpu;
+    CPUState *new_cpu = ENV_GET_CPU(new_env);
     CPUBreakpoint *bp;
     CPUWatchpoint *wp;
 
-    if (!new_env) {
-        fprintf(stderr, "cpu_copy: Failed to create new CPU\n");
-        exit(1);
-    }
-
-    new_cpu = ENV_GET_CPU(new_env);
-
     /* Reset non arch specific state */
     cpu_reset(new_cpu);