aboutsummaryrefslogtreecommitdiff
path: root/target/loongarch/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/loongarch/cpu.c')
-rw-r--r--target/loongarch/cpu.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c
index 07319d6fb9..81f2d8d8ed 100644
--- a/target/loongarch/cpu.c
+++ b/target/loongarch/cpu.c
@@ -718,15 +718,9 @@ static ObjectClass *loongarch_cpu_class_by_name(const char *cpu_model)
g_autofree char *typename
= g_strdup_printf(LOONGARCH_CPU_TYPE_NAME("%s"), cpu_model);
oc = object_class_by_name(typename);
- if (!oc) {
- return NULL;
- }
}
- if (object_class_dynamic_cast(oc, TYPE_LOONGARCH_CPU)) {
- return oc;
- }
- return NULL;
+ return oc;
}
void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)