From 94d912d1928cabbad20fd6abab0b679682c75058 Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Fri, 10 Jan 2020 19:30:16 +0400 Subject: qdev: remove extraneous error All callers use error_abort, and even the function itself calls with error_abort. Signed-off-by: Marc-André Lureau Message-Id: <20200110153039.1379601-4-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini --- hw/core/qdev.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'hw/core/qdev.c') diff --git a/hw/core/qdev.c b/hw/core/qdev.c index b47dc07c6e..60aec8b788 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -717,24 +717,17 @@ static void qdev_property_add_legacy(DeviceState *dev, Property *prop, g_free(name); } -void qdev_property_add_static(DeviceState *dev, Property *prop, - Error **errp) +void qdev_property_add_static(DeviceState *dev, Property *prop) { - Error *local_err = NULL; Object *obj = OBJECT(dev); if (prop->info->create) { - prop->info->create(obj, prop, &local_err); + prop->info->create(obj, prop, &error_abort); } else { object_property_add(obj, prop->name, prop->info->name, prop->info->get, prop->info->set, prop->info->release, - prop, &local_err); - } - - if (local_err) { - error_propagate(errp, local_err); - return; + prop, &error_abort); } object_property_set_description(obj, prop->name, @@ -989,7 +982,7 @@ static void device_initfn(Object *obj) do { for (prop = DEVICE_CLASS(class)->props; prop && prop->name; prop++) { qdev_property_add_legacy(dev, prop, &error_abort); - qdev_property_add_static(dev, prop, &error_abort); + qdev_property_add_static(dev, prop); } class = object_class_get_parent(class); } while (class != object_class_by_name(TYPE_DEVICE)); -- cgit v1.2.3-55-g7522