]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
x86: vmx: Micro-cleanup in vcpu_vendor_cell_init
authorJan Kiszka <jan.kiszka@siemens.com>
Tue, 11 Aug 2015 04:35:11 +0000 (06:35 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Tue, 22 Dec 2015 14:24:31 +0000 (15:24 +0100)
Return the error code directly instead of take the indirect route via
pre-initialized err variable. Avoids that some refactoring once destroys
this relationship.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/x86/vmx.c

index 0aef3a1c1000cf9b1e55230c58cef0db4afbd039..db3b914f143819fc70c7e7d473fb92607217fb85 100644 (file)
@@ -325,12 +325,12 @@ unsigned long arch_paging_gphys2phys(struct per_cpu *cpu_data,
 
 int vcpu_vendor_cell_init(struct cell *cell)
 {
-       int err = -ENOMEM;
+       int err;
 
        /* allocate io_bitmap */
        cell->arch.vmx.io_bitmap = page_alloc(&mem_pool, PIO_BITMAP_PAGES);
        if (!cell->arch.vmx.io_bitmap)
-               return err;
+               return -ENOMEM;
 
        /* build root EPT of cell */
        cell->arch.vmx.ept_structs.root_paging = ept_paging;