Commit f588557
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: Anish Moorthy <amoorthy@google.com>
Link: https://lore.kernel.org/r/20240215235405.368539-5-amoorthy@google.com
[sean: use ternary operator]
Signed-off-by: Sean Christopherson <seanjc@google.com>1 parent a3bd2f7 commit f588557
1 file changed
Lines changed: 3 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3035 | 3035 | | |
3036 | 3036 | | |
3037 | 3037 | | |
3038 | | - | |
3039 | | - | |
3040 | | - | |
3041 | | - | |
3042 | | - | |
3043 | | - | |
3044 | 3038 | | |
3045 | 3039 | | |
3046 | 3040 | | |
3047 | | - | |
| 3041 | + | |
| 3042 | + | |
| 3043 | + | |
3048 | 3044 | | |
3049 | 3045 | | |
3050 | 3046 | | |
| |||
0 commit comments