[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f0bac432-ad0f-8d6a-eb92-6135f68d16d6@gmail.com>
Date: Wed, 27 Nov 2019 11:05:30 +0800
From: Haiwei Li <lihaiwei.kernel@...il.com>
To: linux-kernel@...r.kernel.org, kvm@...r.kernel.org, x86@...nel.org
Cc: pbonzini@...hat.com, rkrcmar@...hat.com,
sean.j.christopherson@...el.com, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com
Subject: [PATCH] KVM: SVM: Fix "error" isn't initialized
From d32ebcf6f426385942fe6c469255e73188cd7d38 Mon Sep 17 00:00:00 2001
From: Haiwei Li <lihaiwei@...cent.com>
Date: Wed, 27 Nov 2019 11:03:21 +0800
Subject: [PATCH] initialize 'error'
There are a bunch of error paths were "error" isn't initialized.
Signed-off-by: Haiwei Li <lihaiwei@...cent.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
---
arch/x86/kvm/svm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 362e874..0b3d49c 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -6294,7 +6294,8 @@ static int enable_smi_window(struct kvm_vcpu *vcpu)
static int sev_flush_asids(void)
{
- int ret, error;
+ int ret;
+ int error = 0;
/*
* DEACTIVATE will clear the WBINVD indicator causing DF_FLUSH to fail,
--
1.8.3.1
Powered by blists - more mailing lists