[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200825061856.25382-1-gshan@redhat.com>
Date: Tue, 25 Aug 2020 16:18:55 +1000
From: Gavin Shan <gshan@...hat.com>
To: kvmarm@...ts.cs.columbia.edu
Cc: linux-kernel@...r.kernel.org, maz@...nel.org,
suzuki.poulose@....com
Subject: [PATCH 1/2] arm64/kvm: Drop unnecessary check in kvm_vcpu_preferred_target()
Since commit <bca556ac468a> ("arm64/kvm: Add generic v8 KVM target"),
there is no negative number returned from kvm_target_cpu(). So it's
not needed to validate its return value in kvm_vcpu_preferred_target()
and this just drops the unnecessary check.
Signed-off-by: Gavin Shan <gshan@...hat.com>
---
arch/arm64/kvm/guest.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/arm64/kvm/guest.c b/arch/arm64/kvm/guest.c
index dfb5218137ca..2365449ea32e 100644
--- a/arch/arm64/kvm/guest.c
+++ b/arch/arm64/kvm/guest.c
@@ -835,9 +835,6 @@ int kvm_vcpu_preferred_target(struct kvm_vcpu_init *init)
{
int target = kvm_target_cpu();
- if (target < 0)
- return -ENODEV;
-
memset(init, 0, sizeof(*init));
/*
--
2.23.0
Powered by blists - more mailing lists