Skip to content
Commit f588557a authored by Anish Moorthy's avatar Anish Moorthy Committed by Sean Christopherson
Browse files

KVM: Simplify error handling in __gfn_to_pfn_memslot()



KVM_HVA_ERR_RO_BAD satisfies kvm_is_error_hva(), so there's no need to
duplicate the "if (writable)" block. Fix this by bringing all
kvm_is_error_hva() cases under one conditional.

Signed-off-by: default avatarAnish Moorthy <amoorthy@google.com>
Link: https://lore.kernel.org/r/20240215235405.368539-5-amoorthy@google.com
[sean: use ternary operator]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent a3bd2f7e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment