mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
qom/cpu: move cpu_model null check to cpu_class_by_name()
and clean every implementation. Suggested-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20170917232842.14544-1-f4bug@amsat.org> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
530049bc1d
commit
8301ea444a
14 changed files with 8 additions and 56 deletions
|
@ -939,10 +939,6 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
|
|||
char *typename;
|
||||
char **cpuname;
|
||||
|
||||
if (!cpu_model) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
cpuname = g_strsplit(cpu_model, ",", 1);
|
||||
typename = g_strdup_printf(ARM_CPU_TYPE_NAME("%s"), cpuname[0]);
|
||||
oc = object_class_by_name(typename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue