projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d225f53
)
KVM: kvm->arch.vioapic should be NULL if kvm_ioapic_init() failure
author
Wei Yongjun
<yjwei@cn.fujitsu.com>
Tue, 9 Feb 2010 02:31:09 +0000
(10:31 +0800)
committer
Marcelo Tosatti
<mtosatti@redhat.com>
Mon, 1 Mar 2010 15:36:09 +0000
(12:36 -0300)
kvm->arch.vioapic should be NULL in case of kvm_ioapic_init() failure
due to cannot register io dev.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
virt/kvm/ioapic.c
patch
|
blob
|
blame
|
history
diff --git
a/virt/kvm/ioapic.c
b/virt/kvm/ioapic.c
index a2edfd177fafae3e0c3c455d2b9ca94ef619e663..f3d06934ae6d2f544d6eca8f2a5753788f34a26f 100644
(file)
--- a/
virt/kvm/ioapic.c
+++ b/
virt/kvm/ioapic.c
@@
-393,8
+393,10
@@
int kvm_ioapic_init(struct kvm *kvm)
mutex_lock(&kvm->slots_lock);
ret = kvm_io_bus_register_dev(kvm, KVM_MMIO_BUS, &ioapic->dev);
mutex_unlock(&kvm->slots_lock);
- if (ret < 0)
+ if (ret < 0) {
+ kvm->arch.vioapic = NULL;
kfree(ioapic);
+ }
return ret;
}