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>
This commit is contained in:
parent
3185bf8c23
commit
6b5d7a9f6f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user