diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-10 19:30:16 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-24 20:59:12 +0100 |
commit | 94d912d1928cabbad20fd6abab0b679682c75058 (patch) | |
tree | ff84ed7637b24dc8d88a5f0a02ffcf7aafedc9fc /hw/core/qdev.c | |
parent | 421720c87c118ee0b22ca861bb52a418947f3e7e (diff) |
qdev: remove extraneous error
All callers use error_abort, and even the function itself calls with
error_abort.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-4-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/core/qdev.c')
-rw-r--r-- | hw/core/qdev.c | 15 |
1 files changed, 4 insertions, 11 deletions
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)); |