local_err in migration_ioc_process_incoming() is used only in the multifd if branch. Move the local_err check under the multifd branch, where it is actually used.
Signed-off-by: Avihai Horon <avih...@nvidia.com> --- migration/migration.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index 6fc544711a..ccd497ca21 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -863,15 +863,15 @@ void migration_ioc_process_incoming(QIOChannel *ioc, Error **errp) assert(migration_needs_multiple_sockets()); if (migrate_multifd()) { multifd_recv_new_channel(ioc, &local_err); + if (local_err) { + error_propagate(errp, local_err); + return; + } } else { assert(migrate_postcopy_preempt()); f = qemu_file_new_input(ioc); postcopy_preempt_new_channel(mis, f); } - if (local_err) { - error_propagate(errp, local_err); - return; - } } if (migration_should_start_incoming(default_channel)) { -- 2.26.3