aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorGonglei <arei.gonglei@huawei.com>2014-09-02 20:03:05 +0800
committerAndreas Färber <afaerber@suse.de>2014-09-04 16:14:47 +0200
commitd578029e71311de1b1476229d88d4aca02b783a3 (patch)
tree36e5212043359712b20ea110367a26c7f8f71584 /hw
parent843ef73a690aabbea6a897e86a426ee7554d7aff (diff)
qdev: Use error_abort instead of using local_err
This error can not happen normally. If it happens, it indicates something very wrong, we should abort QEMU. Moreover, the user can only refer to /machine/peripheral or /objects, not /machine/unattached. While at it, remove superfluous check about local_err. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/core/qdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index da1ba48c99..4a1ac5b3f9 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -820,13 +820,13 @@ static void device_set_realized(Object *obj, bool value, Error **errp)
}
if (value && !dev->realized) {
- if (!obj->parent && local_err == NULL) {
+ if (!obj->parent) {
static int unattached_count;
gchar *name = g_strdup_printf("device[%d]", unattached_count++);
object_property_add_child(container_get(qdev_get_machine(),
"/unattached"),
- name, obj, &local_err);
+ name, obj, &error_abort);
g_free(name);
}