Commit 955997e8 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by Sean Christopherson
Browse files

KVM: x86: Use mutex guards to eliminate __kvm_x86_vendor_init()



Use the recently introduced guard(mutex) infrastructure acquire and
automatically release vendor_module_lock when the guard goes out of scope.
Drop the inner __kvm_x86_vendor_init(), its sole purpose was to simplify
releasing vendor_module_lock in error paths.

No functional change intended.

Signed-off-by: default avatarNikolay Borisov <nik.borisov@suse.com>
Reviewed-by: default avatarKai Huang <kai.huang@intel.com>
Link: https://lore.kernel.org/r/20231030141728.1406118-1-nik.borisov@suse.com


[sean: rewrite changelog]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 41bccc98
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment