projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f1e754
)
migration/rdma: simplify ram_control_load_hook()
author
Juan Quintela
<quintela@redhat.com>
Thu, 4 May 2023 11:44:40 +0000
(13:44 +0200)
committer
Juan Quintela
<quintela@redhat.com>
Thu, 4 May 2023 23:04:32 +0000
(
01:04
+0200)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <
20230504114443
.23891-3-quintela@redhat.com>
migration/qemu-file.c
patch
|
blob
|
history
diff --git
a/migration/qemu-file.c
b/migration/qemu-file.c
index ee04240a21ba77a5ee52d1c1e7d0939df8f2a9a5..b7afc8d498ff7ab45c55b946e102e98ab0991b68 100644
(file)
--- a/
migration/qemu-file.c
+++ b/
migration/qemu-file.c
@@
-340,10
+340,8
@@
void ram_control_after_iterate(QEMUFile *f, uint64_t flags)
void ram_control_load_hook(QEMUFile *f, uint64_t flags, void *data)
{
- int ret = -EINVAL;
-
if (f->hooks && f->hooks->hook_ram_load) {
- ret = f->hooks->hook_ram_load(f, flags, data);
+
int
ret = f->hooks->hook_ram_load(f, flags, data);
if (ret < 0) {
qemu_file_set_error(f, ret);
}
@@
-353,7
+351,7
@@
void ram_control_load_hook(QEMUFile *f, uint64_t flags, void *data)
* that expects there to be a hook on the destination.
*/
if (flags == RAM_CONTROL_HOOK) {
- qemu_file_set_error(f,
ret
);
+ qemu_file_set_error(f,
-EINVAL
);
}
}
}