]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nSVM: refactor svm_leave_smm and smm_enter_smm
authorMaxim Levitsky <mlevitsk@redhat.com>
Wed, 22 Sep 2021 14:28:43 +0000 (10:28 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 22 Sep 2021 14:47:43 +0000 (10:47 -0400)
commita1b65df45684318c3fc46165e43f33510c941372
tree9847950a06fc86a2796d84845847ffa3cdd3fe28
parentc35e1a2b2669260ae2cd9a5bc90e7f98a23a5532
KVM: x86: nSVM: refactor svm_leave_smm and smm_enter_smm

Use return statements instead of nested if, and fix error
path to free all the maps that were allocated.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210913140954.165665-2-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c