Utilize the existed errp to propagate the error instead of the temporary &error_abort.
Cc: Markus Armbruster <arm...@redhat.com> Cc: Jiri Slaby <jsl...@suse.cz> Signed-off-by: Fei Li <f...@suse.com> --- hw/misc/edu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/misc/edu.c b/hw/misc/edu.c index 3f4ba7ded3..011fe6e0b7 100644 --- a/hw/misc/edu.c +++ b/hw/misc/edu.c @@ -356,9 +356,10 @@ static void pci_edu_realize(PCIDevice *pdev, Error **errp) qemu_mutex_init(&edu->thr_mutex); qemu_cond_init(&edu->thr_cond); - /* TODO: let the further caller handle the error instead of abort() here */ - qemu_thread_create(&edu->thread, "edu", edu_fact_thread, - edu, QEMU_THREAD_JOINABLE, &error_abort); + if (!qemu_thread_create(&edu->thread, "edu", edu_fact_thread, + edu, QEMU_THREAD_JOINABLE, errp)) { + return; + } memory_region_init_io(&edu->mmio, OBJECT(edu), &edu_mmio_ops, edu, "edu-mmio", 1 * MiB); -- 2.13.7