]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
KVM: SVM: Use guard(mutex) to simplify SNP AP Creation error handling
authorSean Christopherson <seanjc@google.com>
Thu, 27 Feb 2025 01:25:38 +0000 (17:25 -0800)
committerSean Christopherson <seanjc@google.com>
Mon, 3 Mar 2025 15:34:53 +0000 (07:34 -0800)
commit46332437e1c546e2ade4fedab2715c66bce573cc
tree161cb74da252f689d99ba04e991e735b99b23b4b
parentc6e129fb2ad2c60f22890c0ebe29deffb8cd61f7
KVM: SVM: Use guard(mutex) to simplify SNP AP Creation error handling

Use guard(mutex) in sev_snp_ap_creation() and modify the error paths to
return directly instead of jumping to a common exit point.

No functional change intended.

Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Link: https://lore.kernel.org/r/20250227012541.3234589-8-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/sev.c