Message ID | 20190722075339.25121-2-richardw.yang@linux.intel.com |
---|---|
State | New |
Headers | show |
Series | migration: cleanup ram_load | expand |
* Wei Yang (richardw.yang@linux.intel.com) wrote: > It is not reasonable to continue when version_id mismatch. > > Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> > --- > migration/ram.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/migration/ram.c b/migration/ram.c > index 7e34c82a72..6bfdfae16e 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -4216,7 +4216,7 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) > seq_iter++; > > if (version_id != 4) { > - ret = -EINVAL; > + return -EINVAL; > } Oh yes that's nice; it's before the lock gets taken so we can just return Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> > if (!migrate_use_compression()) { > -- > 2.17.1 > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff --git a/migration/ram.c b/migration/ram.c index 7e34c82a72..6bfdfae16e 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -4216,7 +4216,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()) {
It is not reasonable to continue when version_id mismatch. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)