Skip to contentSkip to conversation

KVM: SVM: Remove redundant ret = 0 in svm_set_nested_state

PATCH Applied Qiang Ma 2 participants 2 messages Jun 18 – Jul 14

Subsystems (3)
lore
Share & tools
lore

Qiang Ma

author
#0 lore raw

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.

---
 arch/x86/kvm/svm/nested.c | 1 -
 1 file changed, 1 deletion(-)
arch/x86/kvm/svm/nested.c +0 -1
index b340dc9991adb..b95e7283bc888 100644
@@ -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
maintainer Applied
#1 lore raw
Quoted 8 lines · Qiang Ma

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.

[...]

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

--
https://github.com/kvm-x86/linux/tree/next