Skip to content

Commit 6b5d7a9

Browse files
Xiao Guangrongavikivity
authored andcommitted
KVM: PIT: free irq source id in handling error path
Free irq source id if create pit workqueue fail Signed-off-by: Xiao Guangrong <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
1 parent 3185bf8 commit 6b5d7a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/x86/kvm/i8254.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,7 @@ struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags)
697697
pit->wq = create_singlethread_workqueue("kvm-pit-wq");
698698
if (!pit->wq) {
699699
mutex_unlock(&pit->pit_state.lock);
700+
kvm_free_irq_source_id(kvm, pit->irq_source_id);
700701
kfree(pit);
701702
return NULL;
702703
}

0 commit comments

Comments
 (0)