]> Gentwo Git Trees - linux/.git/commit
KVM: x86: hyper-v: Use guard() instead of mutex_lock() to simplify code
authorLiao Yuanhong <liaoyuanhong@vivo.com>
Mon, 1 Sep 2025 13:16:04 +0000 (21:16 +0800)
committerSean Christopherson <seanjc@google.com>
Tue, 16 Sep 2025 19:55:11 +0000 (12:55 -0700)
commitcbd860293d139fae44b76d821d8112aab89d8e17
tree30ea17dd36fef62eb95fc768b9952d8f3e3a3936
parent4319fa120f0f42be167d56d84ece94340e11d61e
KVM: x86: hyper-v: 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 setting up the TSC page for a Hyper-V guest.

No functional change intended.

Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
Link: https://lore.kernel.org/r/20250901131604.646415-1-liaoyuanhong@vivo.com
[sean: tweak changelog]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/hyperv.c