KVM: x86: clear bus pointer when destroyed
authorPeter Xu <peterx@redhat.com>
Wed, 15 Mar 2017 08:01:17 +0000 (16:01 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 21 Mar 2017 16:11:18 +0000 (17:11 +0100)
commitdf630b8c1e851b5e265dc2ca9c87222e342c093b
treea033e928a091f3d9368da2c6a33e524f4bd62e66
parent3aa53859d23e1b9cf1a60f82a9008e35ef10bd6a
KVM: x86: clear bus pointer when destroyed

When releasing the bus, let's clear the bus pointers to mark it out. If
any further device unregister happens on this bus, we know that we're
done if we found the bus being released already.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
virt/kvm/kvm_main.c