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 | |
parent | 3b77f6c353a4bb8a66dab8a46668a7ccccc9de03 (diff) |
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')
-rw-r--r-- | hw/ppc/e500plat.c | 1 | ||||
-rw-r--r-- | hw/ppc/spapr.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/hw/ppc/e500plat.c b/hw/ppc/e500plat.c index 1a469ba69f..d8e3f2066e 100644 --- a/hw/ppc/e500plat.c +++ b/hw/ppc/e500plat.c @@ -74,6 +74,7 @@ static void e500plat_machine_class_init(ObjectClass *oc, void *data) HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(oc); MachineClass *mc = MACHINE_CLASS(oc); + assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = e500plat_machine_get_hotpug_handler; hc->plug = e500plat_machine_device_plug_cb; diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index a1abcba6ad..ebf30dd60b 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; |