Skip to content

Commit

Permalink
KVM: VMX: code clean for vmx_init()
Browse files Browse the repository at this point in the history
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
  • Loading branch information
Guo Chao authored and Marcelo Tosatti committed Jul 3, 2012
1 parent f9808b7 commit 2106a54
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -7290,23 +7290,21 @@ static int __init vmx_init(void)
if (!vmx_io_bitmap_a)
return -ENOMEM;

r = -ENOMEM;

vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_b) {
r = -ENOMEM;
if (!vmx_io_bitmap_b)
goto out;
}

vmx_msr_bitmap_legacy = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_msr_bitmap_legacy) {
r = -ENOMEM;
if (!vmx_msr_bitmap_legacy)
goto out1;
}


vmx_msr_bitmap_longmode = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_msr_bitmap_longmode) {
r = -ENOMEM;
if (!vmx_msr_bitmap_longmode)
goto out2;
}


/*
* Allow direct access to the PC debug port (it is often used for I/O
Expand Down

0 comments on commit 2106a54

Please sign in to comment.