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>
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;