From 9933c07995dc978f8ea636cead7c66d78428484b Mon Sep 17 00:00:00 2001 Message-Id: <9933c07995dc978f8ea636cead7c66d78428484b.1387382496.git.minovotn@redhat.com> In-Reply-To: References: From: Nigel Croxon Date: Thu, 14 Nov 2013 22:53:10 +0100 Subject: [PATCH 34/46] savevm: fix wrong initialization by ram_control_load_hook RH-Author: Nigel Croxon Message-id: <1384469598-13137-35-git-send-email-ncroxon@redhat.com> Patchwork-id: 55720 O-Subject: [RHEL7.0 PATCH 34/42] savevm: fix wrong initialization by ram_control_load_hook Bugzilla: 1011720 RH-Acked-by: Orit Wasserman RH-Acked-by: Amit Shah RH-Acked-by: Paolo Bonzini Bugzilla: 1011720 https://bugzilla.redhat.com/show_bug.cgi?id=1011720 >From commit ID: commit c77a5f2daa1ccbd825d59b95c70207c0a196bb94 Author: Lei Li Date: Wed Sep 4 17:02:35 2013 +0800 savevm: fix wrong initialization by ram_control_load_hook It should set negative error value rather than 0 in QEMUFile if there has been an error. Reviewed-by: Michael R. Hines Signed-off-by: Lei Li Signed-off-by: Juan Quintela --- savevm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Signed-off-by: Michal Novotny --- savevm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index 03fc4d9..a0d4e09 100644 --- a/savevm.c +++ b/savevm.c @@ -642,7 +642,7 @@ void ram_control_after_iterate(QEMUFile *f, uint64_t flags) void ram_control_load_hook(QEMUFile *f, uint64_t flags) { - int ret = 0; + int ret = -EINVAL; if (f->ops->hook_ram_load) { ret = f->ops->hook_ram_load(f, f->opaque, flags); -- 1.7.11.7