KVM: SVM: Remove redundant ret = 0 in svm_set_nested_state
PATCH 1/1 KVM: SVM: Remove redundant ret = 0 in svm_set_nested_state
In svm_set_nested_state(), the success path reaches out_free with ret already set to 0 from nested_svm_load_cr3(). The explicit 'ret = 0' assignment before out_free is therefore redundant. Remove it.
No functional change.
Signed-off-by Qiang Ma <[email protected]>
--- arch/x86/kvm/svm/nested.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/kvm/svm/nested.c +0 -1
@@ -2019,7 +2019,6 @@ static int svm_set_nested_state(struct kvm_vcpu *vcpu,kvm_make_request (KVM_REQ_APICV_UPDATE , vcpu);kvm_make_request (KVM_REQ_GET_NESTED_STATE_PAGES , vcpu); - ret =0 ; out_free:kfree (save);kfree (ctl);
Signature · 1 line
2.20.1
Quoted 8 lines · Qiang Ma
In
svm_set_nested_state(), the success path reachesout_freewith ret already set to 0 fromnested_svm_load_cr3(). The explicit 'ret = 0' assignment beforeout_freeis therefore redundant. Remove it.No functional change.
[...]
Applied to kvm-x86 svm, thanks!
[1/1] KVM: SVM: Remove redundant ret = 0 in svm_set_nested_state
https://github.com/kvm-x86/linux/commit/bfafeb04a040