migration/rdma: simplify ram_control_load_hook()
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230504114443.23891-3-quintela@redhat.com>
This commit is contained in:
parent
5f1e7540b4
commit
cf7fe0c5b0
@ -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)
|
void ram_control_load_hook(QEMUFile *f, uint64_t flags, void *data)
|
||||||
{
|
{
|
||||||
int ret = -EINVAL;
|
|
||||||
|
|
||||||
if (f->hooks && f->hooks->hook_ram_load) {
|
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) {
|
if (ret < 0) {
|
||||||
qemu_file_set_error(f, ret);
|
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.
|
* that expects there to be a hook on the destination.
|
||||||
*/
|
*/
|
||||||
if (flags == RAM_CONTROL_HOOK) {
|
if (flags == RAM_CONTROL_HOOK) {
|
||||||
qemu_file_set_error(f, ret);
|
qemu_file_set_error(f, -EINVAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user