KVM: x86: Fix uninitialized return code
authorJan Kiszka <jan.kiszka@siemens.com>
Sun, 2 Dec 2012 10:04:14 +0000 (11:04 +0100)
committerGleb Natapov <gleb@redhat.com>
Sun, 2 Dec 2012 15:37:04 +0000 (17:37 +0200)
This is a regression caused by 18595411a7.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Gleb Natapov <gleb@redhat.com>
arch/x86/kvm/x86.c

index b0b8abe688cecd670f84ac5c698ceaaaed21df39..3bdaf298b8c796dc7c5e6ecdc42ec56d453ed905 100644 (file)
@@ -3006,6 +3006,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,
                break;
        }
        case KVM_SET_LAPIC: {
+               r = -EINVAL;
                if (!vcpu->arch.apic)
                        goto out;
                u.lapic = memdup_user(argp, sizeof(*u.lapic));