From: Alexander Graf <ag...@suse.de>

Commit 94ccff13 introduced a more verbose failure message and retry
operations on KVM VM creation. However, it ended up using a variable
for its failure message that hasn't been initialized yet.

Fix it to use the value it meant to set.

Cc: qemu-sta...@nongnu.org
Signed-off-by: Alexander Graf <ag...@suse.de>
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
 kvm-all.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index f742f8d..979a8d9 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1427,7 +1427,7 @@ int kvm_init(void)
     } while (ret == -EINTR);
 
     if (ret < 0) {
-        fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -s->vmfd,
+        fprintf(stderr, "ioctl(KVM_CREATE_VM) failed: %d %s\n", -ret,
                 strerror(-ret));
 
 #ifdef TARGET_S390X
-- 
1.7.1


Reply via email to