KVM: cleanup the failure path of KVM_CREATE_IRQCHIP ioctrl
authorWei Yongjun <yjwei@cn.fujitsu.com>
Tue, 9 Feb 2010 02:33:03 +0000 (10:33 +0800)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:36:10 +0000 (12:36 -0300)
commit72bb2fcd23afe8db53b47e8f9edd736c517ba532
treeb79884bcb50077fec7cb5615178cacbbf9e6ce04
parent1ae77badc2504d157800f10a81a58cc9c941e7cb
KVM: cleanup the failure path of KVM_CREATE_IRQCHIP ioctrl

If we fail to init ioapic device or the fail to setup the default irq
routing, the device register by kvm_create_pic() and kvm_ioapic_init()
remain unregister. This patch fixed to do this.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/i8259.c
arch/x86/kvm/irq.h
arch/x86/kvm/x86.c
virt/kvm/ioapic.c
virt/kvm/ioapic.h