summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-08-17 11:02:12 +0400
committerAvi Kivity <avi@redhat.com>2010-08-17 13:04:23 +0400
commit6b5d7a9f6f7ff0e096829c1d82f70d5a6066b889 (patch)
tree038f87a177579878af53c1961a18da6960bf5378 /arch
parent3185bf8c23149f32d7e7363b84539ea50b26ecb1 (diff)
downloadlinux-6b5d7a9f6f7ff0e096829c1d82f70d5a6066b889.tar.xz
KVM: PIT: free irq source id in handling error path
Free irq source id if create pit workqueue fail Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/i8254.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index f539c3c2a687..ddeb2314b522 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -697,6 +697,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
pit->wq = create_singlethread_workqueue("kvm-pit-wq");
if (!pit->wq) {
mutex_unlock(&pit->pit_state.lock);
+ kvm_free_irq_source_id(kvm, pit->irq_source_id);
kfree(pit);
return NULL;
}