diff mbox series

[PULL,06/12] migration/colo: Add missing error-propagation code

Message ID 20200507170211.238283-7-dgilbert@redhat.com
State New
Headers show
Series [PULL,01/12] migration: fix bad indentation in error_report() | expand

Commit Message

Dr. David Alan Gilbert May 7, 2020, 5:02 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Running the coccinelle script produced:

  $ spatch \
    --macro-file scripts/cocci-macro-file.h --include-headers \
    --sp-file scripts/coccinelle/find-missing-error_propagate.cocci \
    --keep-comments --smpl-spacing --dir .
  HANDLING: ./migration/colo.c
  [[manual check required: error_propagate() might be missing in migrate_set_block_enabled() ./migration/colo.c:439:4]]

Add the missing error_propagate() after review.

Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200413205250.687-1-f4bug@amsat.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 migration/colo.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/migration/colo.c b/migration/colo.c
index 1b3493729b..d015d4f84e 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -443,6 +443,9 @@  static int colo_do_checkpoint_transaction(MigrationState *s,
 
     /* Disable block migration */
     migrate_set_block_enabled(false, &local_err);
+    if (local_err) {
+        goto out;
+    }
     qemu_mutex_lock_iothread();
 
 #ifdef CONFIG_REPLICATION