summary refs log tree commit diff stats
path: root/kvm-all.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2011-11-02 02:16:34 +0400
committermalc <av1474@comtv.ru>2011-11-02 02:16:34 +0400
commitef26ee0e6c67d415f8b22850f9f13a972ada8be1 (patch)
treec18a9cc2a9f213c8a37473f9b7aa001a99898547 /kvm-all.c
parentdd7b25b5b47df8aaf5580faaf3f60b2a1b779c37 (diff)
parente1c2008af64487e7d3cec615612b7f467ebe9bc8 (diff)
downloadfocaccia-qemu-ef26ee0e6c67d415f8b22850f9f13a972ada8be1.tar.gz
focaccia-qemu-ef26ee0e6c67d415f8b22850f9f13a972ada8be1.zip
Merge branch 'master' of git://git.qemu.org/qemu
Diffstat (limited to 'kvm-all.c')
-rw-r--r--kvm-all.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kvm-all.c b/kvm-all.c
index c09ddf7ac5..4c466d6aba 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -740,6 +740,7 @@ int kvm_init(void)
         fprintf(stderr, "Please add the 'switch_amode' kernel parameter to "
                         "your host kernel command line\n");
 #endif
+        ret = s->vmfd;
         goto err;
     }
 
@@ -798,7 +799,7 @@ int kvm_init(void)
 
 err:
     if (s) {
-        if (s->vmfd != -1) {
+        if (s->vmfd >= 0) {
             close(s->vmfd);
         }
         if (s->fd != -1) {