diff --git a/sys/amd64/vmm/vmm.c b/sys/amd64/vmm/vmm.c index 174d4794d3eb..1de44705a903 100644 --- a/sys/amd64/vmm/vmm.c +++ b/sys/amd64/vmm/vmm.c @@ -937,7 +937,7 @@ vm_set_x2apic_state(struct vm *vm, int vcpuid, enum x2apic_state state) if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); - if (state < 0 || state >= X2APIC_STATE_LAST) + if (state >= X2APIC_STATE_LAST) return (EINVAL); vm->vcpu[vcpuid].x2apic_state = state;