mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 11:04:58 -06:00
qom: Drop @errp parameter of object_property_del()
Same story as for object_property_add(): the only way object_property_del() can fail is when the property with this name does not exist. Since our property names are all hardcoded, failure is a programming error, and the appropriate way to handle it is passing &error_abort. Most callers do that, the commit before previous fixed one that didn't (and got the error handling wrong), and the two remaining exceptions ignore errors. Drop the @errp parameter. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200505152926.18877-19-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
7ef1553dac
commit
df4fe0b291
7 changed files with 8 additions and 14 deletions
|
@ -405,7 +405,7 @@ static void spapr_drc_release(SpaprDrc *drc)
|
|||
g_free(drc->fdt);
|
||||
drc->fdt = NULL;
|
||||
drc->fdt_start_offset = 0;
|
||||
object_property_del(OBJECT(drc), "device", &error_abort);
|
||||
object_property_del(OBJECT(drc), "device");
|
||||
drc->dev = NULL;
|
||||
}
|
||||
|
||||
|
@ -551,7 +551,7 @@ static void unrealize(DeviceState *d)
|
|||
vmstate_unregister(VMSTATE_IF(drc), &vmstate_spapr_drc, drc);
|
||||
root_container = container_get(object_get_root(), DRC_CONTAINER_PATH);
|
||||
name = g_strdup_printf("%x", spapr_drc_index(drc));
|
||||
object_property_del(root_container, name, &error_abort);
|
||||
object_property_del(root_container, name);
|
||||
g_free(name);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue