mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 20:23:57 +08:00
KVM: PIT: unregister kvm irq notifier if fail to create pit
If fail to create pit, we should unregister kvm irq notifier which register in kvm_create_pit(). Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Acked-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
a19a6d1131
commit
d225f53b76
@ -663,8 +663,9 @@ fail_unregister:
|
||||
kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS, &pit->dev);
|
||||
|
||||
fail:
|
||||
if (pit->irq_source_id >= 0)
|
||||
kvm_free_irq_source_id(kvm, pit->irq_source_id);
|
||||
kvm_unregister_irq_mask_notifier(kvm, 0, &pit->mask_notifier);
|
||||
kvm_unregister_irq_ack_notifier(kvm, &pit_state->irq_ack_notifier);
|
||||
kvm_free_irq_source_id(kvm, pit->irq_source_id);
|
||||
|
||||
kfree(pit);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user