diff options
author | zhang songyi <zhang.songyi@zte.com.cn> | 2022-11-28 15:03:38 +0300 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2023-01-24 21:06:47 +0300 |
commit | 5f6015b26ba2e0352c17b9034f1f62c653170713 (patch) | |
tree | 94884df85f428772d1b419ab976049a6fc917f3d | |
parent | 7cb79f433e75b05d1635aefaa851cfcd1cb7dc4f (diff) | |
download | linux-5f6015b26ba2e0352c17b9034f1f62c653170713.tar.xz |
KVM: SVM: remove redundant ret variable
Return value from svm_nmi_blocked() directly instead of taking
this in another redundant variable.
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
Link: https://lore.kernel.org/r/202211282003389362484@zte.com.cn
Signed-off-by: Sean Christopherson <seanjc@google.com>
-rw-r--r-- | arch/x86/kvm/svm/svm.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index d13cf53e7390..f5fd44fa113f 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -3583,7 +3583,6 @@ bool svm_nmi_blocked(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb *vmcb = svm->vmcb; - bool ret; if (!gif_set(svm)) return true; @@ -3591,10 +3590,8 @@ bool svm_nmi_blocked(struct kvm_vcpu *vcpu) if (is_guest_mode(vcpu) && nested_exit_on_nmi(svm)) return false; - ret = (vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) || - (vcpu->arch.hflags & HF_NMI_MASK); - - return ret; + return (vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) || + (vcpu->arch.hflags & HF_NMI_MASK); } static int svm_nmi_allowed(struct kvm_vcpu *vcpu, bool for_injection) |