From: Lei Li Date: Wed, 4 Sep 2013 09:02:35 +0000 (+0800) Subject: savevm: fix wrong initialization by ram_control_load_hook X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=c77a5f2daa1ccbd825d59b95c70207c0a196bb94;p=qemu.git 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 --- diff --git a/savevm.c b/savevm.c index a834c6f69a..2f631d4045 100644 --- a/savevm.c +++ b/savevm.c @@ -649,7 +649,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);