diff --git a/qemu/hw/sparc/leon3.c b/qemu/hw/sparc/leon3.c index 6472b3a2..d0e359aa 100644 --- a/qemu/hw/sparc/leon3.c +++ b/qemu/hw/sparc/leon3.c @@ -43,7 +43,8 @@ static int leon3_generic_hw_init(struct uc_struct *uc, MachineState *machine) cpu_model = "LEON3"; } - uc->cpu = cpu = cpu_sparc_init(uc, cpu_model); + cpu = cpu_sparc_init(uc, cpu_model); + uc->cpu = CPU(cpu); if (cpu == NULL) { fprintf(stderr, "qemu: Unable to find Sparc CPU definition\n"); return -1;