diff options
author | Juan Quintela <quintela@redhat.com> | 2023-05-04 13:44:40 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-05-05 01:04:32 +0200 |
commit | cf7fe0c5b057bccbbf75c491688cfbfbc5ea20a5 (patch) | |
tree | 1b6a15308b933bb91e4716e82f3c128036115a67 /migration | |
parent | 5f1e7540b45fb2a73055a73efb3d7568d107cdd5 (diff) | |
download | qemu-cf7fe0c5b057bccbbf75c491688cfbfbc5ea20a5.zip qemu-cf7fe0c5b057bccbbf75c491688cfbfbc5ea20a5.tar.gz qemu-cf7fe0c5b057bccbbf75c491688cfbfbc5ea20a5.tar.bz2 |
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>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/qemu-file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c index ee04240..b7afc8d 100644 --- 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); } } } |