From: Gonglei Date: Tue, 2 Sep 2014 12:03:05 +0000 (+0800) Subject: qdev: Use error_abort instead of using local_err X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~209^2~608^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d578029e71311de1b1476229d88d4aca02b783a3;p=sdk%2Femulator%2Fqemu.git 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 Reviewed-by: Peter Crosthwaite Signed-off-by: Andreas Färber --- 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); }