diff options
author | Igor Mammedov <imammedo@redhat.com> | 2018-05-10 18:10:56 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-05-10 18:10:56 +0100 |
commit | debbdc00182eb83db5d8acc241feb37c81bc63ec (patch) | |
tree | 16afa83a5be90e68fc41f38bf615c5ad46a09c1b /hw/ppc/spapr.c | |
parent | 3b77f6c353a4bb8a66dab8a46668a7ccccc9de03 (diff) | |
download | qemu-debbdc00182eb83db5d8acc241feb37c81bc63ec.zip qemu-debbdc00182eb83db5d8acc241feb37c81bc63ec.tar.gz qemu-debbdc00182eb83db5d8acc241feb37c81bc63ec.tar.bz2 |
make sure that we aren't overwriting mc->get_hotplug_handler by accident
Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1525691524-32265-5-git-send-email-imammedo@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a1abcba..ebf30dd 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3980,6 +3980,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) mc->kvm_type = spapr_kvm_type; machine_class_allow_dynamic_sysbus_dev(mc, TYPE_SPAPR_PCI_HOST_BRIDGE); mc->pci_allow_0_address = true; + assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = spapr_get_hotplug_handler; hc->pre_plug = spapr_machine_device_pre_plug; hc->plug = spapr_machine_device_plug; |