From 8301ea444abb49f7b7fb939b09c1e23b22977f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Sun, 17 Sep 2017 20:28:42 -0300 Subject: qom/cpu: move cpu_model null check to cpu_class_by_name() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and clean every implementation. Suggested-by: Eduardo Habkost Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20170917232842.14544-1-f4bug@amsat.org> Reviewed-by: Igor Mammedov Reviewed-by: Laurent Vivier Reviewed-by: Artyom Tarasenko Signed-off-by: Eduardo Habkost --- target/unicore32/cpu.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'target/unicore32/cpu.c') diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c index c9b78ce68e..138acc9dd8 100644 --- a/target/unicore32/cpu.c +++ b/target/unicore32/cpu.c @@ -44,10 +44,6 @@ static ObjectClass *uc32_cpu_class_by_name(const char *cpu_model) ObjectClass *oc; char *typename; - if (cpu_model == NULL) { - return NULL; - } - typename = g_strdup_printf("%s-" TYPE_UNICORE32_CPU, cpu_model); oc = object_class_by_name(typename); g_free(typename); -- cgit v1.2.1