]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
core: remove redundant test on error-code
authorBenjamin Block <bebl@mageta.org>
Wed, 19 Nov 2014 15:05:22 +0000 (16:05 +0100)
committerJan Kiszka <jan.kiszka@siemens.com>
Wed, 19 Nov 2014 17:44:08 +0000 (18:44 +0100)
The global error-state is checked before a call to cpu_init and checked
again in it. Because this happens under a lock and the global state is
never touched in cpu_init - or any sub-call -, the second check is
redundant and will always be true, thus remove it.

Signed-off-by: Benjamin Block <bebl@mageta.org>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/setup.c

index 45d59b6913f17e6cff3861585e13cee16db73133..f11e226ac6767c1c21ebb453d816a9bb610a0984 100644 (file)
@@ -111,8 +111,7 @@ static void cpu_init(unsigned int cpu_id, struct per_cpu *cpu_data)
 
 failed:
        printk("FAILED\n");
-       if (!error)
-               error = err;
+       error = err;
 }
 
 int map_root_memory_regions(void)