aboutsummaryrefslogtreecommitdiff
path: root/arch_init.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2011-10-05 01:14:46 +0200
committerJuan Quintela <quintela@redhat.com>2011-10-20 13:23:52 +0200
commit42802d47dd09c6e70763676bb2ba59136427ec6a (patch)
tree93f90e6d8f51d9e586a0914fe34e3a1a14f7cd52 /arch_init.c
parent3961b4dd0e72ae70e612be1097176d8910fc3f5e (diff)
downloadqemu-42802d47dd09c6e70763676bb2ba59136427ec6a.zip
qemu-42802d47dd09c6e70763676bb2ba59136427ec6a.tar.gz
qemu-42802d47dd09c6e70763676bb2ba59136427ec6a.tar.bz2
migration: use qemu_file_get_error() return value when possible
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'arch_init.c')
-rw-r--r--arch_init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch_init.c b/arch_init.c
index 9128be0..98daaf3 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -371,6 +371,7 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
{
ram_addr_t addr;
int flags;
+ int error;
if (version_id < 3 || version_id > 4) {
return -EINVAL;
@@ -451,8 +452,9 @@ int ram_load(QEMUFile *f, void *opaque, int version_id)
qemu_get_buffer(f, host, TARGET_PAGE_SIZE);
}
- if (qemu_file_get_error(f)) {
- return -EIO;
+ error = qemu_file_get_error(f);
+ if (error) {
+ return error;
}
} while (!(flags & RAM_SAVE_FLAG_EOS));