From: Qiang Ma <maqianga@uniontech.com>
To: seanjc@google.com, pbonzini@redhat.com, tglx@kernel.org,
bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org,
hpa@zytor.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Qiang Ma <maqianga@uniontech.com>
Subject: [PATCH] KVM: SVM: Remove redundant ret = 0 in svm_set_nested_state
Date: Thu, 18 Jun 2026 16:52:17 +0800 [thread overview]
Message-ID: <20260618085217.3934985-1-maqianga@uniontech.com> (raw)
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 <maqianga@uniontech.com>
---
arch/x86/kvm/svm/nested.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index b340dc9991adb..b95e7283bc888 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -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);
--
2.20.1
next reply other threads:[~2026-06-18 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-18 8:52 Qiang Ma [this message]
2026-07-14 18:41 ` Sean Christopherson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260618085217.3934985-1-maqianga@uniontech.com \
--to=maqianga@uniontech.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®