]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: x86: Use guard() instead of mutex_lock() to simplify code
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Mon, 1 Sep 2025 13:18:21 +0000 (21:18 +0800)
committerSean Christopherson <seanjc@google.com>
Tue, 16 Sep 2025 19:55:10 +0000 (12:55 -0700)
commit4319fa120f0f42be167d56d84ece94340e11d61e
tree869ae72da10638aae9f6ef229b4e4120b02a1f05
parent06dc910f5e07a3b85ea1a6891596689f492ecc72
KVM: x86: Use guard() instead of mutex_lock() to simplify code

Use guard(mutex) instead of mutex_lock/mutex_unlock pair to simplify the
error handling when allocating the APIC access page.

No functional change intended.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://lore.kernel.org/r/20250901131822.647802-1-liaoyuanhong@vivo.com
[sean: add blank link to isolate guard(), tweak changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/lapic.c