mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
spapr.c: handle dev->id in spapr_memory_unplug_rollback()
As done in hw/acpi/memory_hotplug.c, pass an empty string if dev->id is NULL to qapi_event_send_mem_unplug_error() to avoid relying on a behavior that can be changed in the future. Suggested-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20210907004755.424931-3-danielhb413@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
99b2c06225
commit
44d886abab
@ -3690,7 +3690,7 @@ void spapr_memory_unplug_rollback(SpaprMachineState *spapr, DeviceState *dev)
|
||||
*/
|
||||
qapi_error = g_strdup_printf("Memory hotunplug rejected by the guest "
|
||||
"for device %s", dev->id);
|
||||
qapi_event_send_mem_unplug_error(dev->id, qapi_error);
|
||||
qapi_event_send_mem_unplug_error(dev->id ? : "", qapi_error);
|
||||
}
|
||||
|
||||
/* Callback to be called during DRC release. */
|
||||
|
Loading…
Reference in New Issue
Block a user