diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f06ec5688cde54d1367218d164af506af817181c..d8a747c9b4e0fb1a5e10d5cca7fb97e1aeb69af9 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2233,12 +2233,6 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, if (niothreads < 0) goto cleanup; - /* Nothing to do */ - if (niothreads == 0) { - ret = 0; - goto cleanup; - } - if (niothreads != vm->def->iothreads) { virReportError(VIR_ERR_INTERNAL_ERROR, _("got wrong number of IOThread pids from QEMU monitor. " @@ -2247,6 +2241,12 @@ qemuProcessDetectIOThreadPIDs(virQEMUDriverPtr driver, goto cleanup; } + /* Nothing to do */ + if (niothreads == 0) { + ret = 0; + goto cleanup; + } + for (i = 0; i < niothreads; i++) { virDomainIOThreadIDDefPtr iothrid;