migration: return -EINVAL directly when version_id mismatch

It is not reasonable to continue when version_id mismatch.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20190722075339.25121-2-richardw.yang@linux.intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Wei Yang 2019-07-22 15:53:38 +08:00 committed by Dr. David Alan Gilbert
parent 4695ce3fdc
commit be4a1a1b6f

View File

@ -4334,7 +4334,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
seq_iter++;
if (version_id != 4) {
ret = -EINVAL;
return -EINVAL;
}
if (!migrate_use_compression()) {