Commit 2106a548 authored by Guo Chao's avatar Guo Chao Committed by Marcelo Tosatti

KVM: VMX: code clean for vmx_init()

Signed-off-by: default avatarGuo Chao <yan@linux.vnet.ibm.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent f9808b7f
...@@ -7290,23 +7290,21 @@ static int __init vmx_init(void) ...@@ -7290,23 +7290,21 @@ static int __init vmx_init(void)
if (!vmx_io_bitmap_a) if (!vmx_io_bitmap_a)
return -ENOMEM; return -ENOMEM;
r = -ENOMEM;
vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL); vmx_io_bitmap_b = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_b) { if (!vmx_io_bitmap_b)
r = -ENOMEM;
goto out; goto out;
}
vmx_msr_bitmap_legacy = (unsigned long *)__get_free_page(GFP_KERNEL); vmx_msr_bitmap_legacy = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_msr_bitmap_legacy) { if (!vmx_msr_bitmap_legacy)
r = -ENOMEM;
goto out1; goto out1;
}
vmx_msr_bitmap_longmode = (unsigned long *)__get_free_page(GFP_KERNEL); vmx_msr_bitmap_longmode = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_msr_bitmap_longmode) { if (!vmx_msr_bitmap_longmode)
r = -ENOMEM;
goto out2; goto out2;
}
/* /*
* Allow direct access to the PC debug port (it is often used for I/O * Allow direct access to the PC debug port (it is often used for I/O
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment