mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
KVM: VMX: code clean for vmx_init()
Signed-off-by: Guo Chao <yan@linux.vnet.ibm.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
parent
f9808b7fd4
commit
2106a54812
1 changed files with 7 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue