aboutsummaryrefslogtreecommitdiff
path: root/target/moxie/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'target/moxie/cpu.c')
-rw-r--r--target/moxie/cpu.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c
index 748d02f29e..30bd44fcad 100644
--- a/target/moxie/cpu.c
+++ b/target/moxie/cpu.c
@@ -89,13 +89,7 @@ static void moxie_cpu_initfn(Object *obj)
static ObjectClass *moxie_cpu_class_by_name(const char *cpu_model)
{
- ObjectClass *oc;
-
- if (cpu_model == NULL) {
- return NULL;
- }
-
- oc = object_class_by_name(cpu_model);
+ ObjectClass *oc = object_class_by_name(cpu_model);
if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_MOXIE_CPU) ||
object_class_is_abstract(oc))) {
return NULL;