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/arm/virt.c | |
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/arm/virt.c')
-rw-r--r-- | hw/arm/virt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 6710be226f..a3a28e20e8 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1669,6 +1669,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) mc->cpu_index_to_instance_props = virt_cpu_index_to_props; mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a15"); mc->get_default_cpu_node_id = virt_get_default_cpu_node_id; + assert(!mc->get_hotplug_handler); mc->get_hotplug_handler = virt_machine_get_hotplug_handler; hc->plug = virt_machine_device_plug_cb; } |