make load_vmstate() return errors

Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/vl.c b/vl.c
index 95ed511..9b2bf00 100644
--- a/vl.c
+++ b/vl.c
@@ -6030,8 +6030,11 @@
         exit(1);
     }
 
-    if (loadvm)
-        load_vmstate(cur_mon, loadvm);
+    if (loadvm) {
+        if (load_vmstate(cur_mon, loadvm) < 0) {
+            autostart = 0;
+        }
+    }
 
     if (incoming) {
         qemu_start_incoming_migration(incoming);